.TH gpac 1 2019 gpac GPAC
.
.SH NAME
.LP
gpac \- GPAC command-line filter session manager
.SH SYNOPSIS
.LP
.B gpac
.RI [options] FILTER [LINK] FILTER [...]
.br
.
.SH DESCRIPTION
.LP
This page describes all filters usually present in GPAC

To check for help on a filter not listed here, use gpac -h myfilter

.SH inspect
.LP
.br
Description: Packet inspector
.br

.br
The inspect filter can be used to dump PID and packets. It may also be used to check parts of payload of the packets.
.br

.br
The default options inspect only PID changes.
.br
If .I full is not set, .I mode is forced to frame and PID properties are formatted in human-readable form, one PID per line.
.br
Otherwise, all properties are dumped.
.br
Note: specifying .I xml, .I analyze, .I fmt or using -for-test will force .I full to true.
.br

.br
.SH Custom property dumping
.LP
.br
The packet inspector can be configured to dump specific properties of packets using .I fmt.
.br
When the option is not present, all properties are dumped. Otherwise, only properties identified by $TOKEN$ are printed. You may use '$', '@' or '%' for TOKEN separator. TOKEN can be:
.br
* pn: packet (frame in framed mode) number
.br
* dts: decoding time stamp in stream timescale, N/A if not available
.br
* ddts: difference between current and previous packets decoding time stamp in stream timescale, N/A if not available
.br
* cts: composition time stamp in stream timescale, N/A if not available
.br
* dcts: difference between current and previous packets composition time stamp in stream timescale, N/A if not available
.br
* ctso: difference between composition time stamp and decoding time stamp in stream timescale, N/A if not available
.br
* tmcd: timecode as provided in SEI, N/A if not available (requires reframer)
.br
* dur: duration in stream timescale
.br
* frame: framing status
.br
  * interface: complete AU, interface object (no size info). Typically a GL texture
.br
  * frame_full: complete AU
.br
  * frame_start: beginning of frame
.br
  * frame_end: end of frame
.br
  * frame_cont: frame continuation (not beginning, not end)
.br
* sap or rap: SAP type of the frame
.br
* ilace: interlacing flag (0: progressive, 1: top field, 2: bottom field)
.br
* corr: corrupted packet flag
.br
* seek: seek flag
.br
* bo: byte offset in source, N/A if not available
.br
* roll: roll info
.br
* crypt: crypt flag
.br
* vers: carousel version number
.br
* size: size of packet
.br
* csize: total size of packets received so far
.br
* crc: 32 bit CRC of packet
.br
* lf or n: insert new line
.br
* t: insert tab
.br
* data: hex dump of packet (big output!) or as string if legal UTF-8
.br
* lp: leading picture flag
.br
* depo: depends on other packet flag
.br
* depf: is depended on other packet flag
.br
* red: redundant coding flag
.br
* start: packet composition time as HH:MM:SS.ms
.br
* startc: packet composition time as HH:MM:SS,ms
.br
* end: packet end time as HH:MM:SS.ms
.br
* endc: packet end time as HH:MM:SS,ms
.br
* ck: clock type used for PCR discontinuities
.br
* pcr: MPEG-2 TS last PCR, n/a if not available
.br
* pcrd: difference between last PCR and decoding time, n/a if no PCR available
.br
* pcrc: difference between last PCR and composition time, n/a if no PCR available
.br
* P4CC: 4CC of packet property
.br
* PropName: Name of packet property
.br
* pid.P4CC: 4CC of PID property
.br
* pid.PropName: Name of PID property
.br
* fn: Filter name
.br

.br
Example
.br
fmt="PID $pid.ID$ packet $pn$ DTS $dts$ CTS $cts$ $lf$"
.br

.br
This dumps packet number, cts and dts as follows: PID 1 packet 10 DTS 100 CTS 108 \n
.br
  
.br
An unrecognized keyword or missing property will resolve to an empty string.
.br

.br
Note: when dumping in interleaved mode, there is no guarantee that the packets will be dumped in their original sequence order since the inspector fetches one packet at a time on each PID.
.br

.br
.SH Note on playback
.LP
.br
Buffering can be enabled to check the input filter chain behaviour, e.g. check HAS adaptation logic.
.br
The various buffering options control when packets are consumed. Buffering events are logged using media@info for state changes and media@debug for media filling events.
.br
The .I speed option is only used to configure the filter chain but is ignored by the filter when consuming packets.
.br
If real-time consumption is required, a reframer filter must be setup before the inspect filter.
.br
Example
.br
gpac -i SRC reframer:rt=on inspect:buffer=10000:rbuffer=1000:mbuffer=30000:speed=2
.br

.br
This will play the session at 2x speed, using 30s of maximum buffering, consuming packets after 10s of media are ready and rebuffering if less than 1s of media.
.br

.br
.SH Options (expert):
.LP
.br
log (str, default: stdout, Enum: _any|stderr|stdout|GLOG|TL|null): set probe log filename
.br
* _any: target file path and name
.br
* stderr: dump to stderr
.br
* stdout: dump to stdout
.br
* GLOG: use GPAC logs app@info
.br
* TL: use GPAC log tool TL at level info
.br
* null: silent mode
.br

.br
mode (enum, default: pck):     dump mode
.br
* pck: dump full packet
.br
* blk: dump packets before reconstruction
.br
* frame: force reframer
.br
* raw: dump source packets without demultiplexing
.br

.br
interleave (bool, default: true): dump packets as they are received on each PID. If false, logs are reported for each PID at end of session
.br
deep (bool, default: false, updatable): dump packets along with PID state change, implied when .I fmt is set
.br
props (bool, default: true, updatable): dump packet properties, ignored when .I fmt is set
.br
dump_data (bool, default: false, updatable): enable full data dump (very large output), ignored when .I fmt is set
.br
fmt (str, updatable):          set packet dump format
.br
hdr (bool, default: true):     print a header corresponding to fmt string without '$' or "pid"
.br
allp (bool, default: false):   analyse for the entire duration, rather than stopping when all PIDs are found
.br
info (bool, default: false, updatable): monitor PID info changes
.br
full (bool, default: false, updatable): full dump of PID properties (always on if XML)
.br
pcr (bool, default: false, updatable): dump M2TS PCR info
.br
speed (dbl, default: 1.0):     set playback command speed. If negative and start is 0, start is set to -1
.br
start (dbl, default: 0.0):     set playback start offset. A negative value means percent of media duration with -1 equal to duration
.br
dur (frac, default: 0/0):      set inspect duration
.br
analyze (enum, default: off, updatable): analyze sample content (NALU, OBU), similar to -bsdbg option of reframer filters
.br
* off: no analyzing
.br
* on: simple analyzing
.br
* bs: log bitstream syntax (all elements read from bitstream)
.br
* full: log bitstream syntax and bit sizes signaled as (N) after field value, except 1-bit fields (omitted)
.br

.br
xml (bool, default: false, updatable): use xml formatting (implied if (-analyze]() is set) and disable .I fmt
.br
crc (bool, default: false, updatable): dump crc of samples of subsamples (NALU or OBU) when analyzing
.br
fftmcd (bool, default: false, updatable): consider timecodes use ffmpeg-compatible signaling rather than QT compliant one
.br
dtype (bool, default: false, updatable): dump property type
.br
buffer (uint, default: 0):     set playback buffer in ms
.br
mbuffer (uint, default: 0):    set max buffer occupancy in ms. If less than buffer, use buffer
.br
rbuffer (uint, default: 0, updatable): rebuffer trigger in ms. If 0 or more than buffer, disable rebuffering
.br
stats (bool, default: false):  compute statistics for PIDs
.br
timeout (uint, default: 5000): timeout in ms when doing simple inspection in case no packets are received on some PIDs
.br
test (enum, default: no, updatable): skip predefined set of properties, used for test mode
.br
* no: no properties skipped
.br
* noprop: all properties/info changes on PID are skipped, only packets are dumped
.br
* network: URL/path dump, cache state, file size properties skipped (used for hashing network results)
.br
* netx: same as network but skip track duration and templates (used for hashing progressive load of fmp4)
.br
* encode: same as network plus skip decoder config (used for hashing encoding results)
.br
* encx: same as encode and skip bitrates, media data size and co
.br
* nocrc: disable packet CRC dump
.br
* nobr: skip bitrate
.br

.br

.br
.SH probe
.LP
.br
Description: Source prober
.br

.br
The Probe filter is used by applications (typically MP4Box) to query demultiplexed PIDs (audio, video, ...) available in a source chain.
.br

.br
The filter outputs the number of input PIDs in the file specified by .I log.
.br
It is up to the app developer to query input PIDs of the prober and take appropriated decisions.
.br

.br
.SH Options (expert):
.LP
.br
log (str, default: stdout, Enum: _any|stderr|stdout|GLOG|null): set probe log filename to print number of streams
.br
* _any: target file path and name
.br
* stderr: dump to stderr
.br
* stdout: dump to stdout
.br
* GLOG: use GPAC logs app@info
.br
* null: silent mode
.br

.br

.br
.SH compositor
.LP
.br
Description: Compositor
.br

.br
The GPAC compositor allows mixing audio, video, text and graphics in a timed fashion.
.br
The compositor operates either in media-client or filter-only mode.
.br

.br
.SH Media-client mode
.LP
.br
In this mode, the compositor acts as a pseudo-sink for the video side and creates its own output window.
.br
The video frames are dispatched to the output video PID in the form of frame pointers requiring later GPU read if used.
.br
The audio part acts as a regular filter, potentially mixing and resampling the audio inputs to generate its output.
.br
User events are directly processed by the filter in this mode.
.br

.br
.SH Filter mode
.LP
.br
In this mode, the compositor acts as a regular filter generating frames based on the loaded scene.
.br
It will generate its outputs based on the input video frames, and will process user event sent by consuming filter(s).
.br
If no input video frames (e.g. pure BIFS / SVG / VRML), the filter will generate frames based on the .I fps, at constant or variable frame rate.
.br
It will stop generating frames as soon as all input streams are done, unless extended/reduced by .I dur.
.br
If audio streams are loaded, an audio output PID is created.
.br

.br
The default output pixel format in filter mode is:
.br
- rgb when the filter is explicitly loaded by the application
.br
- rgba when the filter is loaded during a link resolution
.br
This can be changed by assigning the .I opfmt option.
.br
If either .I opfmt specifies alpha channel or .I bc is not 0 but has alpha=0, background creation in default scene will be skipped.
.br

.br
In filter-only mode, the special URL gpid:// is used to locate PIDs in the scene description, in order to design scenes independently from source media.
.br
When such a PID is associated to a Background2D node in BIFS (no SVG mapping yet), the compositor operates in pass-through mode.
.br
In this mode, only new input frames on the pass-through PID will generate new frames, and the scene clock matches the input packet time.
.br
The output size and pixel format will be set to the input size and pixel format, unless specified otherwise in the filter options.
.br

.br
If only 2D graphics are used and display driver is not forced, 2D rasterizer will happen in the output pixel format (including YUV pixel formats).
.br
In this case, in-place processing (rasterizing over the input frame data) will be used whenever allowed by input data.
.br

.br
If 3D graphics are used or display driver is forced, OpenGL will be used on offscreen surface and the output packet will be an OpenGL texture.
.br

.br
.SH Specific URL syntaxes
.LP
.br
The compositor accepts any URL type supported by GPAC. It also accepts the following schemes for URLs:
.br
* views:// : creates an auto-stereo scene of N views from views://v1::.::vN
.br
* mosaic:// : creates a mosaic of N views from mosaic://v1::.::vN
.br

.br
For both syntaxes, vN can be any type of URL supported by GPAC.
.br
For views:// syntax, the number of rendered views is set by .I nbviews:
.br
- If the URL gives less views than rendered, the views will be repeated
.br
- If the URL gives more views than rendered, the extra views will be ignored
.br

.br
The compositor can act as a source filter when the .I src option is explicitly set, independently from the operating mode:
.br
.br
gpac compositor:src=source.mp4 vout
.br

.br

.br
The compositor can act as a source filter when the source url uses one of the compositor built-in protocol schemes:
.br
.br
gpac -i mosaic://URL1:URL2 vout
.br

.br

.br
.SH Options (expert):
.LP
.br
aa (enum, default: all, updatable): set anti-aliasing mode for raster graphics; whether the setting is applied or not depends on the graphics module or graphic card
.br
* none: no anti-aliasing
.br
* text: anti-aliasing for text only
.br
* all: complete anti-aliasing
.br

.br
hlfill (uint, default: 0x0, updatable): set highlight fill color (ARGB)
.br
hlline (uint, default: 0xFF000000, updatable): set highlight stroke color (ARGB)
.br
hllinew (flt, default: 1.0, updatable): set highlight stroke width
.br
sz (bool, default: true, updatable): enable scalable zoom. When scalable zoom is enabled, resizing the output window will also recompute all vectorial objects. Otherwise only the final buffer is stretched
.br
bc (uint, default: 0, updatable): default background color to use when displaying transparent images or video with no scene composition instructions
.br
yuvhw (bool, default: true, updatable): enable YUV hardware for 2D blit
.br
blitp (bool, default: true, updatable): partial hardware blit. If not set, will force more redraw
.br
softblt (bool, default: true): enable software blit/stretch in 2D. If disabled, vector graphics rasterizer will always be used
.br
stress (bool, default: false, updatable): enable stress mode of compositor (rebuild all vector graphics and texture states at each frame)
.br
fast (bool, default: false, updatable): enable speed optimization - whether the setting is applied or not depends on the graphics module / graphic card
.br
bvol (enum, default: no, updatable): draw bounding volume of objects
.br
* no: disable bounding box
.br
* box: draws a rectangle (2D) or box (3D)
.br
* aabb: draws axis-aligned bounding-box tree (3D) or rectangle (2D)
.br

.br
textxt (enum, default: default, updatable): specify whether text shall be drawn to a texture and then rendered or directly rendered. Using textured text can improve text rendering in 3D and also improve text-on-video like content
.br
* default: use texturing for OpenGL rendering, no texture for 2D rasterizer
.br
* never: never uses text textures
.br
* always: always render text to texture before drawing
.br

.br
out8b (bool, default: false, updatable): convert 10-bit video to 8 bit texture before GPU upload
.br
drop (bool, default: false, updatable): drop late frame when drawing. If not set, frames are not dropped until a desynchronization of 1 second or more is observed
.br
sclock (bool, default: false, updatable): force synchronizing all streams on a single clock
.br
sgaze (bool, default: false, updatable): simulate gaze events through mouse
.br
ckey (uint, default: 0, updatable): color key to use in windowless mode (0xFFRRGGBB). GPAC currently does not support true alpha blitting to desktop due to limitations in most windowing toolkit, it therefore uses color keying mechanism. The alpha part of the key is used for global transparency of the output, if supported
.br
timeout (uint, default: 10000, updatable): timeout in ms after which a source is considered dead (0 disable timeout)
.br
fps (frac, default: 30/1, updatable): simulation frame rate when animation-only sources are played (ignored when video is present)
.br
timescale (uint, default: 0, updatable): timescale used for output packets when no input video PID. A value of 0 means fps numerator
.br
autofps (bool, default: true): use video input fps for output, ignored in player mode. If no video or not set, uses .I fps
.br
vfr (bool, default: false):    only emit frames when changes are detected. (always true in player mode and when filter is dynamically loaded)
.br
dur (dbl, default: 0, updatable): duration of generation. Mostly used when no video input is present. Negative values mean number of frames, positive values duration in second, 0 stops as soon as all streams are done
.br
fsize (bool, default: false, updatable): force the scene to resize to the biggest bitmap available if no size info is given in the BIFS configuration
.br
mode2d (enum, default: defer, updatable): specify whether immediate drawing should be used or not
.br
* immediate: the screen is completely redrawn at each frame (always on if pass-through mode is detected)
.br
* defer: object positioning is tracked from frame to frame and dirty rectangles info is collected in order to redraw the minimal amount of the screen buffer
.br
* debug: only renders changed areas, resetting other areas
.br
Whether the setting is applied or not depends on the graphics module and player mode
.br

.br
amc (bool, default: true):     audio multichannel support; if disabled always down-mix to stereo. Useful if the multichannel output does not work properly
.br
asr (uint, default: 0):        force output sample rate (0 for auto)
.br
ach (uint, default: 0):        force output channels (0 for auto)
.br
alayout (uint, default: 0):    force output channel layout (0 for auto)
.br
afmt (afmt, default: s16, Enum: none|u8|s16|s16b|s24|s24b|s32|s32b|flt|fltb|dbl|dblb|u8p|s16p|s24p|s32p|fltp|dblp): force output channel format (0 for auto)
.br

.br
asize (uint, default: 1024):   audio output packet size in samples
.br
abuf (uint, default: 100):     audio output buffer duration in ms - the audio renderer fills the output PID up to this value. A too low value will lower latency but can have real-time playback issues
.br
avol (uint, default: 100, updatable): audio volume in percent
.br
apan (uint, default: 50, updatable): audio pan in percent, 50 is no pan
.br
async (bool, default: true, updatable): audio resynchronization; if disabled, audio data is never dropped but may get out of sync
.br
max_aspeed (dbl, default: 2.0, updatable): silence audio if playback speed is greater than specified value
.br
max_vspeed (dbl, default: 4.0, updatable): move to i-frame only decoding if playback speed is greater than specified value
.br
buffer (uint, default: 3000, updatable): playout buffer in ms (overridden by BufferLength property of input PID)
.br
rbuffer (uint, default: 1000, updatable): rebuffer trigger in ms (overridden by RebufferLength property of input PID)
.br
mbuffer (uint, default: 3000, updatable): max buffer in ms, must be greater than playout buffer (overridden by BufferMaxOccupancy property of input PID)
.br
ntpsync (uint, default: 0, updatable): ntp resync threshold in ms (drops frame if their NTP is more than the given threshold above local ntp), 0 disables ntp drop
.br
nojs (bool, default: false):   disable javascript
.br
noback (bool, default: false): ignore background nodes and viewport fill (useful when dumping to PNG)
.br
ogl (enum, default: auto, updatable): specify 2D rendering mode
.br
* auto: automatically decides between on, off and hybrid based on content
.br
* off: disables OpenGL; 3D will not be rendered
.br
* on: uses OpenGL for all graphics; this will involve polygon tesselation and 2D graphics will not look as nice as 2D mode
.br
* hybrid: the compositor performs software drawing of 2D graphics with no textures (better quality) and uses OpenGL for all 2D objects with textures and 3D objects
.br

.br
pbo (bool, default: false, updatable): enable PixelBufferObjects to push YUV textures to GPU in OpenGL Mode. This may slightly increase the performances of the playback
.br
nav (enum, default: none, updatable): override the default navigation mode of MPEG-4/VRML (Walk) and X3D (Examine)
.br
* none: disables navigation
.br
* walk: 3D world walk
.br
* fly: 3D world fly (no ground detection)
.br
* pan: 2D/3D world zoom/pan
.br
* game: 3D world game (mouse gives walk direction)
.br
* slide: 2D/3D world slide
.br
* exam: 2D/3D object examine
.br
* orbit: 3D object orbit
.br
* vr: 3D world VR (yaw/pitch/roll)
.br

.br
linegl (bool, default: false, updatable): indicate that outlining shall be done through OpenGL pen width rather than vectorial outlining
.br
epow2 (bool, default: true, updatable): emulate power-of-2 textures for OpenGL (old hardware). Ignored if OpenGL rectangular texture extension is enabled
.br
* true: video texture is not resized but emulated with padding. This usually speeds up video mapping on shapes but disables texture transformations
.br
* false: video is resized to a power of 2 texture when mapping to a shape
.br

.br
paa (bool, default: false, updatable): indicate whether polygon antialiasing should be used in full antialiasing mode. If not set, only lines and points antialiasing are used
.br
bcull (enum, default: on, updatable): indicate whether backface culling shall be disable or not
.br
* on: enables backface culling
.br
* off: disables backface culling
.br
* alpha: only enables backface culling for transparent meshes
.br

.br
wire (enum, default: none, updatable): wireframe mode
.br
* none: objects are drawn as solid
.br
* only: objects are drawn as wireframe only
.br
* solid: objects are drawn as solid and wireframe is then drawn
.br

.br
norms (enum, default: none, updatable): normal vector drawing for debug
.br
* none: no normals drawn
.br
* face: one normal per face drawn
.br
* vertex: one normal per vertex drawn
.br

.br
rext (bool, default: true, updatable): use non power of two (rectangular) texture GL extension
.br
cull (bool, default: true, updatable): use aabb culling: large objects are rendered in multiple calls when not fully in viewport
.br
depth_gl_scale (flt, default: 100, updatable): set depth scaler
.br
depth_gl_type (enum, default: none, updatable): set geometry type used to draw depth video
.br
* none: no geometric conversion
.br
* point: compute point cloud from pixel+depth
.br
* strip: same as point but thins point set
.br

.br
nbviews (uint, default: 0, updatable): number of views to use in stereo mode
.br
stereo (enum, default: none, updatable): stereo output type. If your graphic card does not support OpenGL shaders, only top and side modes will be available
.br
* none: no stereo
.br
* side: images are displayed side by side from left to right
.br
* top: images are displayed from top (laft view) to bottom (right view)
.br
* hmd: same as side except that view aspect ratio is not changed
.br
* ana: standard color anaglyph (red for left view, green and blue for right view) is used (forces views=2)
.br
* cols: images are interleaved by columns, left view on even columns and left view on odd columns (forces views=2)
.br
* rows: images are interleaved by columns, left view on even rows and left view on odd rows (forces views=2)
.br
* spv5: images are interleaved by for SpatialView 5 views display, fullscreen mode (forces views=5)
.br
* alio8: images are interleaved by for Alioscopy 8 views displays, fullscreen mode (forces views=8)
.br
* custom: images are interleaved according to the shader file indicated in .I mvshader. The shader is exposed each view as uniform sampler2D gfViewX, where X is the view number starting from the left
.br

.br
mvshader (str, updatable):     file path to the custom multiview interleaving shader
.br
fpack (enum, default: none, updatable): default frame packing of input video
.br
* none: no frame packing
.br
* top: top bottom frame packing
.br
* side: side by side packing
.br

.br
camlay (enum, default: offaxis, updatable): camera layout in multiview modes
.br
* straight: camera is moved along a straight line, no rotation
.br
* offaxis: off-axis projection is used
.br
* linear: camera is moved along a straight line with rotation
.br
* circular: camera is moved along a circle with rotation
.br

.br
iod (flt, default: 6.4, updatable): inter-ocular distance (eye separation) in cm (distance between the cameras). 
.br
rview (bool, default: false, updatable): reverse view order
.br
dbgpack (bool, default: false, updatable): view packed stereo video as single image (show all)
.br
tvtn (uint, default: 30, updatable): number of point sampling for tile visibility algorithm
.br
tvtt (uint, default: 8, updatable): number of points above which the tile is considered visible
.br
tvtd (enum, default: off, updatable): debug tiles and full coverage SRD
.br
* off: regular draw
.br
* partial: only displaying partial tiles, not the full sphere video
.br
* full: only display the full sphere video
.br

.br
tvtf (bool, default: false, updatable): force all tiles to be considered visible, regardless of viewpoint
.br
fov (flt, default: 1.570796326794897, updatable): default field of view for VR
.br
vertshader (str):              path to vertex shader file
.br
fragshader (str):              path to fragment shader file
.br
autocal (bool, default: false, updatable): auto calibration of znear/zfar in depth rendering mode
.br
dispdepth (sint, default: -1, updatable): display depth, negative value uses default screen height
.br
dispdist (flt, default: 50, updatable): distance in cm between the camera and the zero-disparity plane. There is currently no automatic calibration of depth in GPAC
.br
focdist (flt, default: 0, updatable): distance of focus point
.br
osize (v2di, default: 0x0, updatable): force output size. If not set, size is derived from inputs
.br
dpi (v2di, default: 96x96, updatable): default dpi if not indicated by video output
.br
dbgpvr (flt, default: 0, updatable): debug scene used by PVR addon
.br
player (enum, default: no):    set compositor in player mode
.br
* no: regular mode
.br
* base: player mode
.br
* gui: player mode with GUI auto-start
.br

.br
noaudio (bool, default: false): disable audio output
.br
opfmt (pfmt, default: none, Enum: none|yuv420|yvu420|yuv420_10|yuv422|yuv422_10|yuv444|yuv444_10|uyvy|vyuy|yuyv|yvyu|uyvl|vyul|yuyl|yvyl|nv12|nv21|nv1l|nv2l|yuva|yuvd|yuv444a|yuv444p|v308|yuv444ap|v408|v410|v210|grey|algr|gral|rgb4|rgb5|rgb6|rgba|argb|bgra|abgr|rgb|bgr|xrgb|rgbx|xbgr|bgrx|rgbd|rgbds|uncv): pixel format to use for output. Ignored in .I player mode
.br

.br
drv (enum, default: auto):     indicate if graphics driver should be used
.br
* no: never loads a graphics driver, software blit is used, no 3D possible (in player mode, disables OpenGL)
.br
* yes: always loads a graphics driver, output pixel format will be RGB (in player mode, same as auto)
.br
* auto: decides based on the loaded content
.br

.br
src (cstr):                    URL of source content
.br
gaze_x (sint, default: 0, updatable): horizontal gaze coordinate (0=left, width=right)
.br
gaze_y (sint, default: 0, updatable): vertical gaze coordinate (0=top, height=bottom)
.br
gazer_enabled (bool, default: false, updatable): enable gaze event dispatch
.br
subtx (sint, default: 0, updatable): horizontal translation in pixels towards right for subtitles renderers
.br
subty (sint, default: 0, updatable): vertical translation in pixels towards top for subtitles renderers
.br
subfs (uint, default: 0, updatable): font size for subtitles renderers (0 means automatic)
.br
subd (sint, default: 0, updatable): subtitle delay in milliseconds for subtitles renderers
.br
audd (sint, default: 0, updatable): audio delay in milliseconds
.br
clipframe (bool, default: false): visual output is clipped to bounding rectangle
.br

.br
.SH mp4dmx
.LP
.br
Description: ISOBMFF/QT demultiplexer
.br

.br
This filter demultiplexes ISOBMF and QT files.
.br
Input ISOBMFF/QT can be regular or fragmented, and available as files or as raw bytestream.
.br
.SH Track Selection
.LP
.br
The filter can use fragment identifiers of source to select a single track for playback. The allowed fragments are:
.br
 * #audio: only use the first audio track
.br
 * #video: only use the first video track
.br
 * #auxv: only use the first auxiliary video track
.br
 * #pict: only use the first picture track
.br
 * #text: only use the first text track
.br
 * #trackID=VAL: only use the track with given ID
.br
 * #itemID=VAL: only use the item with given ID
.br
 * #ID=VAL: only use the track/item with given ID
.br
 * #VAL: only use the track/item with given ID
.br

.br
.SH Scalable Tracks
.LP
.br
When scalable tracks are present in a file, the reader can operate in 3 modes using .I smode option:
.br
* smode=single: resolves all extractors to extract a single bitstream from a scalable set. The highest level is used
.br
In this mode, there is no enhancement decoder config, only a base one resulting from the merge of the layers configurations
.br
* smode=split: all extractors are removed and every track of the scalable set is declared. In this mode, each enhancement track has no base decoder config
.br
and an enhancement decoder config.
.br
* smode=splitx: extractors are kept in the bitstream, and every track of the scalable set is declared. In this mode, each enhancement track has a base decoder config
.br
 (copied from base) and an enhancement decoder config. This is mostly used for DASHing content.
.br
Warning: smode=splitx will result in extractor NAL units still present in the output bitstream, which shall only be true if the output is ISOBMFF based
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    local file name of source content (only used when explicitly loading the filter)
.br
allt (bool, default: false):   load all tracks even if unknown media type
.br
edits (enum, default: auto):   do not use edit lists
.br
* auto: track delay and no edit list when possible
.br
* no: ignore edit list
.br
* strict: use edit list even if only signaling a delay
.br

.br
itt (bool, default: false):    convert all items of root meta into a single PID
.br
itemid (bool, default: true):  keep item IDs in PID properties
.br
smode (enum, default: split):  load mode for scalable/tile tracks
.br
* split: each track is declared, extractors are removed
.br
* splitx: each track is declared, extractors are kept
.br
* single: a single track is declared (highest level for scalable, tile base for tiling)
.br

.br
alltk (bool, default: false):  declare disabled tracks
.br
frame_size (uint, default: 1024): frame size for raw audio samples (dispatches frame_size samples per packet)
.br
expart (bool, default: false): expose cover art as a dedicated video PID
.br
sigfrag (bool, default: false): signal fragment and segment boundaries of source on output packets, fails if source is not fragmented
.br
tkid (str):                    declare only track based on given param
.br
* integer value: declares track with the given ID
.br
* audio: declares first audio track
.br
* video: declares first video track
.br
* 4CC: declares first track with matching 4CC for handler type
.br

.br
stsd (uint, default: 0):       only extract sample mapped to the given sample description index (0 means extract all)
.br
nocrypt (bool):                signal encrypted tracks as non encrypted (mostly used for export)
.br
mstore_size (uint, default: 1000000): target buffer size in bytes when reading from memory stream (pipe etc...)
.br
mstore_purge (uint, default: 50000): minimum size in bytes between memory purges when reading from memory stream, 0 means purge as soon as possible
.br
mstore_samples (uint, default: 50): minimum number of samples to be present before purging sample tables when reading from memory stream (pipe etc...), 0 means purge as soon as possible
.br
strtxt (bool, default: false): load text tracks (apple/tx3g) as MPEG-4 streaming text tracks
.br
xps_check (enum, default: auto): parameter sets extraction mode from AVC/HEVC/VVC samples
.br
* keep: do not inspect sample (assumes input file is compliant when generating DASH/HLS/CMAF)
.br
* rem: removes all inband xPS and notify configuration changes accordingly
.br
* auto: resolves to keep for smode=splitx (dasher mode), rem otherwise
.br

.br
nodata (enum, default: no):    control sample data loading
.br
* no: regular load
.br
* yes: skip data loading
.br
* fake: allocate sample but no data copy
.br

.br
lightp (bool, default: false): load minimal set of properties
.br
initseg (str):                 local init segment name when input is a single ISOBMFF segment
.br
extk (bool, default: true):    allow external track loading
.br
ctso (sint):                   value to add to CTS offset for tracks using negative ctts
.br
- set to -1 to use the cslg box info or the minimum cts offset present in the track
.br
- set to -2 to use the minimum cts offset present in the track (cslg ignored)
.br

.br
norw (bool, default: false):   skip reformatting of samples - should only be used when rewriting fragments
.br
keepc (bool, default: true):   keep corrupted samples (for multicast sources only)
.br

.br
.SH bifsdec
.LP
.br
Description: MPEG-4 BIFS decoder
.br

.br
This filter decodes MPEG-4 BIFS binary frames directly into the scene graph of the compositor.
.br
Note: This filter cannot be used to dump BIFS content to text or xml, use MP4Box for that.
.br

.br
No options
.br

.br
.SH odfdec
.LP
.br
Description: MPEG-4 OD decoder
.br

.br
This filter decodes MPEG-4 OD binary frames directly into the scene manager of the compositor.
.br
Note: This filter cannot be used to dump OD content to text or xml, use MP4Box for that.
.br

.br
No options
.br

.br
.SH fin
.LP
.br
Description: File input
.br

.br
This filter dispatch raw blocks from input file into a filter chain.
.br
Block size can be adjusted using .I block_size.
.br
Content format can be forced through .I mime and file extension can be changed through .I ext.
.br
Note: Unless disabled at session level (see .I -no-probe ), file extensions are usually ignored and format probing is done on the first data block.
.br
The special file name null is used for creating a file with no data, needed by some filters such as dasher.
.br
The special file name rand is used to generate random data.
.br
The special file name randsc is used to generate random data with 0x000001 start-code prefix.
.br

.br
The filter handles both files and GF_FileIO objects as input URL.
.br

.br
.SS Packet Injecting
.br
The filter can be used to inject a single packet instead of a file using (-pck)[] option.
.br
No specific properties are attached, except a timescale if (-ptime)[] is set.
.br
Example
.br
gpac fin:pck=str@"My Sample Text":ptime=2500/100:#CodecID=stxt:#StreamType=text
.br

.br
This will declare the PID as WebVTT and send a single packet with payload My Sample Text and a timestamp value of 25 second.
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    location of source file
.br
block_size (uint, default: 0): block size used to read file. 0 means 5000 if file less than 500m, 1M otherwise
.br
range (lfrac, default: 0-0):   byte range
.br
ext (cstr):                    override file extension
.br
mime (cstr):                   set file mime type
.br
pck (mem):                     data to use instead of file
.br
ptime (frac, default: 0/0):    timing for data packet, ignored if den is 0
.br

.br
.SH btplay
.LP
.br
Description: BT/XMT/X3D decoder
.br

.br
This filter parses MPEG-4 BIFS (BT and XMT), VRML97 and X3D (wrl and XML) files directly into the scene graph of the compositor.
.br

.br
When .I sax_dur is set to N, the filter will do a progressive load of the source and cancel current loading when processing time is higher than N.
.br

.br
.SH Options (expert):
.LP
.br
sax_dur (uint, default: 0):    duration for SAX parsing (XMT), 0 disables SAX parsing
.br

.br
.SH httpin
.LP
.br
Description: HTTP input
.br

.br
This filter dispatch raw blocks from a remote HTTP resource into a filter chain.
.br
Block size can be adjusted using .I block_size, and disk caching policies can be adjusted.
.br
Content format can be forced through .I mime and file extension can be changed through .I ext.
.br

.br
The filter supports both http and https schemes, and will attempt reconnecting as TLS if TCP connection fails.
.br

.br
Note: Unless disabled at session level (see .I -no-probe ), file extensions are usually ignored and format probing is done on the first data block.
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    URL of source content
.br
block_size (uint, default: 100000): block size used to read file
.br
cache (enum, default: none):   set cache mode
.br
* auto: cache to disk if content length is known, no cache otherwise
.br
* disk: cache to disk, discard once session is no longer used
.br
* keep: cache to disk and keep
.br
* mem: stores to memory, discard once session is no longer used
.br
* mem_keep: stores to memory, keep after session is reassigned but move to mem after first download
.br
* none: no cache
.br
* none_keep: stores to memory, keep after session is reassigned but move to none after first download
.br

.br
range (lfrac, default: 0-0):   set byte range, as fraction
.br
ext (cstr):                    override file extension
.br
mime (cstr):                   set file mime type
.br
blockio (bool, default: false): use blocking IO
.br
idelay (uint, default: 0):     delay first request by the given number of ms
.br

.br
.SH svgplay
.LP
.br
Description: SVG decoder
.br

.br
This filter parses SVG files directly into the scene graph of the compositor.
.br

.br
When .I sax_dur is set to N, the filter will do a progressive load of the source and cancel current loading when processing time is higher than N.
.br

.br
.SH Options (expert):
.LP
.br
sax_dur (uint, default: 0):    loading duration for SAX parsing, 0 disables SAX parsing
.br

.br
.SH rfimg
.LP
.br
Description: JPG/J2K/PNG/BMP reframer
.br

.br
This filter parses JPG/J2K/PNG/BMP files/data and outputs corresponding visual PID and frames.
.br

.br
The following extensions for PNG change the pixel format for RGBA images:
.br
* pngd: use RGB+depth map pixel format
.br
* pngds: use RGB+depth(7bits)+shape(MSB of alpha channel) pixel format
.br

.br
No options
.br

.br
.SH imgdec
.LP
.br
Description: PNG/JPG decoder
.br

.br
This filter decodes JPEG and PNG images.
.br

.br
No options
.br

.br
.SH rfadts
.LP
.br
Description: ADTS reframer
.br

.br
This filter parses AAC files/data and outputs corresponding audio PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
frame_size (uint, default: 1024): size of AAC frame in audio samples
.br
index (dbl, default: 1.0):     indexing window length
.br
ovsbr (bool, default: false):  force oversampling SBR (does not multiply timescales by 2)
.br
sbr (enum, default: no):       set SBR signaling
.br
* no: no SBR signaling at all
.br
* imp: backward-compatible SBR signaling (audio signaled as AAC-LC)
.br
* exp: explicit SBR signaling (audio signaled as AAC-SBR)
.br

.br
ps (enum, default: no):        set PS signaling
.br
* no: no PS signaling at all
.br
* imp: backward-compatible PS signaling (audio signaled as AAC-LC)
.br
* exp: explicit PS signaling (audio signaled as AAC-PS)
.br

.br
expart (bool, default: false): expose pictures as a dedicated video PID
.br
aacchcfg (sint, default: 0):   set AAC channel configuration to this value if missing from ADTS header, use negative value to always override
.br

.br
.SH rflatm
.LP
.br
Description: LATM reframer
.br

.br
This filter parses AAC in LATM files/data and outputs corresponding audio PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
frame_size (uint, default: 1024): size of AAC frame in audio samples
.br
index (dbl, default: 1.0):     indexing window length
.br

.br
.SH rfmp3
.LP
.br
Description: MP3 reframer
.br

.br
This filter parses MPEG-1/2 audio files/data and outputs corresponding audio PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
index (dbl, default: 1.0):     indexing window length
.br
expart (bool, default: false): expose pictures as a dedicated video PID
.br
forcemp3 (bool, default: true): force mp3 signaling for MPEG-2 Audio layer 3
.br

.br
.SH faad
.LP
.br
Description: FAAD decoder
.br

.br
This filter decodes AAC streams through faad library.
.br

.br
No options
.br

.br
.SH maddec
.LP
.br
Description: MAD decoder
.br

.br
This filter decodes MPEG 1/2 audio streams through libmad library.
.br

.br
No options
.br

.br
.SH xviddec
.LP
.br
Description: XVid decoder
.br

.br
This filter decodes MPEG-4 part 2 (and DivX) through libxvidcore library.
.br

.br
.SH Options (expert):
.LP
.br
deblock_y (bool, default: false): enable Y deblocking
.br
deblock_uv (bool, default: false): enable UV deblocking
.br
film_effect (bool, default: false): enable film effect
.br
dering_y (bool, default: false): enable Y deblocking
.br
dering_uv (bool, default: false): enable UV deblocking
.br

.br
.SH j2kdec
.LP
.br
Description: OpenJPEG2000 decoder
.br
Version: 2.x
.br

.br
This filter decodes JPEG2000 streams through OpenJPEG2000 library.
.br

.br
No options
.br

.br
.SH rfac3
.LP
.br
Description: AC3 reframer
.br

.br
This filter parses AC3 and E-AC3 files/data and outputs corresponding audio PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
index (dbl, default: 1.0):     indexing window length
.br

.br
.SH rfac4
.LP
.br
Description: AC4 reframer
.br

.br
This filter parses AC4 files/data and outputs corresponding audio PID and frames.
.br

.br
No options
.br

.br
.SH ufac4
.LP
.br
Description: AC4 writer
.br

.br
This filter converts MPEG-H Audio streams into AC4 encapsulated data.
.br

.br
.SH Options (expert):
.LP
.br
rcfg (bool, default: true):    force repeating decoder config at each I-frame
.br

.br
.SH a52dec
.LP
.br
Description: A52 decoder
.br

.br
This filter decodes AC3 streams through a52dec library.
.br

.br
No options
.br

.br
.SH rfamr
.LP
.br
Description: AMR/EVRC reframer
.br

.br
This filter parses AMR, AMR Wideband, EVRC and SMV files/data and outputs corresponding audio PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
index (dbl, default: 1.0):     indexing window length
.br

.br
.SH oggdmx
.LP
.br
Description: OGG demultiplexer
.br

.br
This filter demultiplexes OGG files/data into a set of media PIDs and frames.
.br

.br
.SH Options (expert):
.LP
.br
index (dbl, default: 1.0):     indexing window length (not implemented), use 0 to disable stream probing for duration), 
.br
expart (bool, default: false): expose pictures as a dedicated video PID
.br

.br
.SH vorbisdec
.LP
.br
Description: Vorbis decoder
.br

.br
This filter decodes Vorbis streams through libvorbis library.
.br

.br
No options
.br

.br
.SH theoradec
.LP
.br
Description: Theora decoder
.br

.br
This filter decodes Theora streams through libtheora library.
.br

.br
No options
.br

.br
.SH m2tsdmx
.LP
.br
Description: MPEG-2 TS demultiplexer
.br

.br
This filter demultiplexes MPEG-2 Transport Stream files/data into a set of media PIDs and frames.
.br

.br
.SH Options (expert):
.LP
.br
temi_url (cstr):               force TEMI URL
.br
dsmcc (bool, default: no):     enable DSMCC receiver
.br
seeksrc (bool, default: true): seek local source file back to origin once all programs are setup
.br
sigfrag (bool, default: false): signal segment boundaries on output packets for DASH or HLS sources
.br
dvbtxt (bool, default: false): export DVB teletext streams
.br
upes (enum, default: no):      keep unknown PES streams
.br
* no: ignored the streams
.br
* info: declare the stream as fake (no data forward), turns on dvbtxt
.br
* full: declare the stream and sends data
.br

.br
mappcr (bool, default: true):  remap PCR and timestamps into continuous timeline
.br

.br
.SH sockin
.LP
.br
Description: UDP/TCP input
.br

.br
This filter handles generic TCP and UDP input sockets. It can also probe for MPEG-2 TS over RTP input. Probing of MPEG-2 TS over UDP/RTP is enabled by default but can be turned off.
.br

.br
Data format can be specified by setting either .I ext or .I mime options. If not set, the format will be guessed by probing the first data packet
.br

.br
- UDP sockets are used for source URLs formatted as udp://NAME
.br
- TCP sockets are used for source URLs formatted as tcp://NAME
.br
- UDP unix domain sockets are used for source URLs formatted as udpu://NAME
.br
- TCP unix domain sockets are used for source URLs formatted as tcpu://NAME
.br

.br
When ports are specified in the URL and the default option separators are used (see gpac -h doc), the URL must either:
.br
- have a trailing '/', e.g. udp://localhost:1234/[:opts]
.br
- use gpac separator, e.g. udp://localhost:1234[:gpac:opts]
.br

.br
When the socket is listening in keep-alive .I ka mode:
.br
- a single connection is allowed and a single output PID will be produced
.br
- each connection close event will triger a pipeline flush
.br

.br
On OSX with VM packet replay you will need to force multicast routing, e.g. route add -net 239.255.1.4/32 -interface vboxnet0
.br
.SH Time Regulation
.LP
.br
The filter uses the time between the last two received packets to estimates how often it should check for inputs. The maximum and minimum times to wait between two calls is given by the .I mwait option. The maximum time may need to be reduced for very high bitrates sources.
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    address of source content
.br
block_size (uint, default: 0x60000): block size used to read socket
.br
port (uint, default: 1234):    default port if not specified
.br
ifce (cstr):                   default multicast interface
.br
listen (bool, default: false): indicate the input socket works in server mode
.br
ka (bool, default: false):     keep socket alive if no more connections
.br
maxc (uint, default: +I):      max number of concurrent connections
.br
tsprobe (bool, default: true): probe for MPEG-2 TS data, either RTP or raw UDP. Disabled if mime or ext are given and do not match MPEG-2 TS mimes/extensions
.br
ext (str):                     indicate file extension of udp data
.br
mime (str):                    indicate mime type of udp data
.br
block (bool, default: false):  set blocking mode for socket(s)
.br
timeout (uint, default: 10000): set timeout in ms for UDP socket(s), 0 to disable timeout
.br
mwait (v2di, default: 1x30):   set min and max wait times in ms to avoid too frequent polling
.br
reorder_pck (uint, default: 100): number of packets delay for RTP reordering (M2TS over RTP) 
.br
reorder_delay (uint, default: 10): number of ms delay for RTP reordering (M2TS over RTP)
.br
ssm (strl):                    list of IP to include for source-specific multicast
.br
ssmx (strl):                   list of IP to exclude for source-specific multicast
.br

.br
.SH dvbin
.LP
.br
Description: DVB for Linux
.br

.br
This filter reads raw MPEG-2 TS from DVB-T/T2 and DVB-S/S2 cards on linux.
.br

.br
The URL scheme used is dvb:// with the following syntaxes:
.br
* `dvb://CHAN`: tunes to channel CHAN in the channel configuration file.
.br
* `dvb://+CHAN`: tunes to multiplex contaning channel CHAN and expose all programs.
.br
* `dvb://=N`: tunes to the N-th channel in the channel configuration file.
.br
* `dvb://@FREQ`: tunes to frequency FREQ and exposes all channels in multiplex.
.br
* `dvb://@=N`: tunes to N-th frequency and exposes all channels in multiplex.
.br
* `dvb://@chlist`: populates the .I chans option with available channels in the configuration file and do nothing else.
.br

.br
When tuning by channel name CHAN, the first entry in the channel configuration file starting with CHAN will be used.
.br

.br
The channel configuration file is set through .I chcfg. The expected format is VDR as produced by w_scan, with a syntax extended for comment lines, starting with #.
.br
Within a comment line, the following keywords can be used to override defaults:
.br
 * `dev=N`: set the adapter index (N integer) or full path (N string).
.br
 * `idx=K`: set the frontend index K.
.br
 * `csidx=S`: set the committed switch index for DiSEqC.
.br

.br
To view the default channels, use gpac -hx dvbin.
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    URL of source content
.br
block_size (uint, default: 65536): block size used to read device
.br
chcfg (cstr, default: $GCFG/channels.conf): path to channels configuration file
.br
dev (str, default: 0):         path to DVB adapter - if first character is a number, this is the device index
.br
idx (uint, default: 0):        frontend index
.br
timeout (uint, default: 5000): timeout in ms before tune failure
.br
csleep (uint, default: 15):    config sleep in ms between DiSEqC commands
.br
csidx (uint, default: 0):      committed switch index for DiSEqC
.br
chans (strl):                  list of all channels, only pupulated for dvb://@chlist URL
.br

.br
.SH osvcdec
.LP
.br
Description: OpenSVC decoder
.br

.br
This filter decodes scalable AVC|H264 streams through OpenSVC library.
.br

.br
No options
.br

.br
.SH vtbdec
.LP
.br
Description: VideoToolBox decoder
.br

.br
This filter decodes video streams through OSX/iOS VideoToolBox (MPEG-2, H263, AVC|H264, HEVC, ProRes). It allows GPU frame dispatch or direct frame copy.
.br

.br
.SH Options (expert):
.LP
.br
reorder (uint, default: 6):    number of frames to wait for temporal re-ordering
.br
no_copy (bool, default: true): dispatch decoded frames as OpenGL textures (true) or as copied packets (false) 
.br
ofmt (pfmt, default: nv12):    set default pixel format for decoded video. If not found, fall back to nv12
.br
disable_hw (bool, default: false): disable hardware decoding
.br
wait_sync (bool, default: false, updatable): wait for sync frame before decoding
.br

.br
.SH mcdec
.LP
.br
Description: MediaCodec decoder
.br

.br
This filter decodes video streams using hardware decoder on android devices
.br

.br
.SH Options (expert):
.LP
.br
disable_gl (bool, default: false): disable OpenGL texture transfer
.br

.br
.SH lsrdec
.LP
.br
Description: MPEG-4 LASeR decoder
.br

.br
This filter decodes MPEG-4 LASeR binary frames directly into the scene graph of the compositor.
.br
Note: This filter cannot be used to dump LASeR content to text or xml, use MP4Box for that.
.br

.br
No options
.br

.br
.SH safdmx
.LP
.br
Description: SAF demultiplexer
.br

.br
This filter demultiplexes SAF (MPEG-4 Simple Aggregation Format for LASeR) files/data into a set of media PIDs and frames.
.br

.br
No options
.br

.br
.SH dashin
.LP
.br
Description: DASH & HLS client
.br

.br
This filter reads MPEG-DASH, HLS and MS Smooth manifests.
.br

.br
.SH Regular mode
.LP
.br
This is the default mode, in which the filter produces media PIDs and frames from sources indicated in the manifest.
.br
The default behavior is to perform adaptation according to .I algo, but the filter can:
.br
- run with no adaptation, to grab maximum quality.
.br
Example
.br
gpac -i MANIFEST_URL:algo=none:start_with=max_bw -o dest.mp4
.br

.br
- run with no adaptation, fetching all qualities.
.br
Example
.br
gpac -i MANIFEST_URL:split_as -o dst=$File$.mp4
.br

.br

.br
.SH File mode
.LP
.br
When .I forward is set to file, the client forwards media files without demultiplexing them.
.br
This is mostly used to expose the DASH session to a file server such as ROUTE or HTTP.
.br
In this mode, the manifest is forwarded as an output PID.
.br
Warning: This mode cannot be set through inheritance as it changes the link capabilities of the filter. The filter MUST be explicitly declared.
.br

.br
To expose a live DASH session to route:
.br
.br
gpac -i MANIFEST_URL dashin:forward=file -o route://225.0.0.1:8000/
.br

.br

.br
If the source has dependent media streams (scalability) and all qualities and initialization segments need to be forwarded, add .I split_as.
.br

.br
.SH Segment bound modes
.LP
.br
When .I forward is set to segb or mani, the client forwards media frames (after demultiplexing) together with segment and fragment boundaries of source files.
.br

.br
This mode can be used to process media data and regenerate the same manifest/segmentation.
.br

.br
Example
.br
gpac -i MANIFEST_URL:forward=mani cecrypt:cfile=DRM.xml -o encrypted/live.mpd:pssh=mv
.br

.br
This will encrypt an existing DASH session, inject PSSH in manifest and segments.
.br

.br
Example
.br
gpac -i MANIFEST_URL:forward=segb cecrypt:cfile=DRM.xml -o encrypted/live.m3u8
.br

.br
This will encrypt an existing DASH session and republish it as HLS, using same segment names and boundaries.
.br

.br
This mode will force .I noseek=true to ensure the first segment fetched is complete, and .I split_as=true to fetch all qualities.
.br

.br
Each first packet of a segment will have the following properties attached:
.br
* `CueStart`: indicate this is a segment start
.br
* `FileNumber`: current segment number
.br
* `FileName`: current segment file name without manifest (MPD or master HLS) base url
.br
* `DFPStart`: set with value 0 if this is the first packet in the period, absent otherwise
.br

.br
If .I forward is set to mani, the first packet of a segment dispatched after a manifest update will also carry the manifest payload as a property:
.br
* `DFManifest`: contains main manifest (MPD, M3U8 master)
.br
* `DFVariant`: contains list of HLS child playlists as strings for the given quality
.br
* `DFVariantName`: contains list of associated HLS child playlists name, in same order as manifests in DFVariant
.br

.br
Each output PID will have the following properties assigned:
.br
* `DFMode`: set to 1 for segb or 2 for mani
.br
* `DCue`: set to inband
.br
* `DFPStart`: set to current period start value
.br
* `FileName`: set to associated init segment if any
.br
* `Representation`: set to the associated representation ID in the manifest
.br
* `DashDur`: set to the average segment duration as indicated in the manifest
.br
* `source_template`: set to true to indicate the source template is known
.br
* `stl_timescale`: timescale used by SegmentTimeline, or 0 if no SegmentTimeline
.br
* `init_url`: unresolved intialization URL (as it appears in the MPD or in the variant playlist)
.br
* `manifest_url`: manifest URL
.br
* `hls_variant_name`: HLS variant playlist name (as it appears in the HLS master playlist)
.br

.br
When the dasher is used together with this mode, this will force all generated segments to have the same name, duration and fragmentation properties as the input ones. It is therefore not recommended for sessions stored/generated on local storage to generate the output in the same directory.
.br

.br
.SH Options (expert):
.LP
.br
auto_switch (sint, default: 0): switch quality every N segments
.br
* positive: go to higher quality or loop to lowest
.br
* negative: go to lower quality or loop to highest
.br
* 0: disabled
.br

.br
segstore (enum, default: mem): enable file caching
.br
* mem: all files are stored in memory, no disk IO
.br
* disk: files are stored to disk but discarded once played
.br
* cache: all files are stored to disk and kept
.br

.br
algo (str, default: gbuf, Enum: none|grate|gbuf|bba0|bolaf|bolab|bolau|bolao|JS): adaptation algorithm to use
.br
* none: no adaptation logic
.br
* grate: GPAC legacy algo based on available rate
.br
* gbuf: GPAC legacy algo based on buffer occupancy
.br
* bba0: BBA-0
.br
* bolaf: BOLA Finite
.br
* bolab: BOLA Basic
.br
* bolau: BOLA-U
.br
* bolao: BOLA-O
.br
* JS: use file JS (either with specified path or in $GSHARE/scripts/) for algo (.js extension may be omitted)
.br

.br
start_with (enum, default: max_bw): initial selection criteria
.br
* min_q: start with lowest quality
.br
* max_q: start with highest quality
.br
* min_bw: start with lowest bitrate
.br
* max_bw: start with highest bitrate; if tiles are used, all low priority tiles will have the lower (below max) bandwidth selected
.br
* max_bw_tiles: start with highest bitrate; if tiles are used, all low priority tiles will have their lowest bandwidth selected
.br

.br
max_res (bool, default: true): use max media resolution to configure display
.br
abort (bool, default: false):  allow abort during a segment download
.br
use_bmin (enum, default: auto): playout buffer handling
.br
* no: use default player settings
.br
* auto: notify player of segment duration if not low latency
.br
* mpd: use the indicated min buffer time of the MPD
.br

.br
shift_utc (sint, default: 0):  shift DASH UTC clock in ms
.br
spd (sint, default: -I):       suggested presentation delay in ms
.br
mcast_shift (sint, default: 0): shift requests time by given ms for multicast sources
.br
server_utc (bool, default: yes): use ServerUTC or Date HTTP headers instead of local UTC
.br
screen_res (bool, default: yes): use screen resolution in selection phase
.br
init_timeshift (sint, default: 0): set initial timeshift in ms (if >0) or in per-cent of timeshift buffer (if <0)
.br
tile_mode (enum, default: none): tile adaptation mode
.br
* none: bitrate is shared equally across all tiles
.br
* rows: bitrate decreases for each row of tiles starting from the top, same rate for each tile on the row
.br
* rrows: bitrate decreases for each row of tiles starting from the bottom, same rate for each tile on the row
.br
* mrows: bitrate decreased for top and bottom rows only, same rate for each tile on the row
.br
* cols: bitrate decreases for each columns of tiles starting from the left, same rate for each tile on the columns
.br
* rcols: bitrate decreases for each columns of tiles starting from the right, same rate for each tile on the columns
.br
* mcols: bitrate decreased for left and right columns only, same rate for each tile on the columns
.br
* center: bitrate decreased for all tiles on the edge of the picture
.br
* edges: bitrate decreased for all tiles on the center of the picture
.br

.br
tiles_rate (uint, default: 100): indicate the amount of bandwidth to use at each quality level. The rate is recursively applied at each level, e.g. if 50%, Level1 gets 50%, level2 gets 25%, ... If 100, automatic rate allocation will be done by maximizing the quality in order of priority. If 0, bitstream will not be smoothed across tiles/qualities, and concurrency may happen between different media
.br
delay40X (uint, default: 500): delay in milliseconds to wait between two 40X on the same segment
.br
exp_threshold (uint, default: 100): delay in milliseconds to wait after the segment AvailabilityEndDate before considering the segment lost
.br
switch_count (uint, default: 1): indicate how many segments the client shall wait before switching up bandwidth. If 0, switch will happen as soon as the bandwidth is enough, but this is more prone to network variations
.br
aggressive (bool, default: no): if enabled, switching algo targets the closest bandwidth fitting the available download rate. If no, switching algo targets the lowest bitrate representation that is above the currently played (e.g. does not try to switch to max bandwidth)
.br
debug_as (uintl):              play only the adaptation sets indicated by their indices (0-based) in the MPD
.br
speedadapt (bool, default: no): enable adaptation based on playback speed
.br
noxlink (bool, default: no):   disable xlink if period has both xlink and adaptation sets
.br
query (str):                   set query string (without initial '?') to append to xlink of periods
.br
split_as (bool, default: no):  separate all qualities into different adaptation sets and stream all qualities. Dependent representations (scalable) are treated as independent
.br
noseek (bool, default: no):    disable seeking of initial segment(s) in dynamic mode (useful when UTC clocks do not match)
.br
bwcheck (uint, default: 5):    minimum time in milliseconds between two bandwidth checks when allowing segment download abort
.br
lowlat (enum, default: early): segment scheduling policy in low latency mode
.br
* no: disable low latency
.br
* strict: strict respect of AST offset in low latency
.br
* early: allow fetching segments earlier than their AST in low latency when input PID is empty
.br

.br
forward (enum, default: none): segment forwarding mode
.br
* none: regular DASH read
.br
* file: do not demultiplex files and forward them as file PIDs (imply segstore=mem)
.br
* segb: turn on .I split_as, segment and fragment bounds signaling (sigfrag) in sources and DASH cue insertion
.br
* mani: same as segb and also forward manifests
.br

.br
fmodefwd (bool, default: yes): forward packet rather than copy them in file forward mode. Packet copy might improve performances in low latency mode
.br
skip_lqt (bool, default: no):  disable decoding of tiles with highest degradation hints (not visible, not gazed at) for debug purposes
.br
llhls_merge (bool, default: yes): merge LL-HLS byte range parts into a single open byte range request
.br
groupsel (bool, default: no):  select groups based on language (by default all playable groups are exposed)
.br
xas (enum, default: codec):    enable cross adaptation set switching (disabled if .I split_as is set)
.br
* no: disabled
.br
* codec: switching across sets only allowed for same codec
.br
* all: switching across sets allowed across any representation types
.br

.br
chain_mode (enum, default: on): MPD chaining mode
.br
* off: do not use MPD chaining
.br
* on: use MPD chaining once over, fallback if MPD load failure
.br
* error: use MPD chaining once over or if error (MPD or segment download)
.br

.br
asloop (bool, default: false): when auto switch is enabled, iterates back and forth from highest to lowest qualities
.br
bsmerge (bool, default: true): allow merging of video bitstreams (only HEVC for now)
.br
keep_burl (enum, default: strip): control BaseURL in manifest
.br
* strip: strip BaseURL (default)
.br
* keep: keep BaseURL
.br
* inject: inject local relative URL before BaseURL value specified by relative_url option
.br

.br
relative_url (str, default: ./): relative string to inject before BaseURL when keep_base_url is set to inject
.br

.br
.SH cdcrypt
.LP
.br
Description: CENC decryptor
.br

.br
The CENC decryptor supports decrypting CENC, ISMA, HLS Sample-AES (MPEG2 ts) and Adobe streams.
.br

.br
For HLS, key is retrieved according to the key URI in the manifest.
.br
Otherwise, the filter uses a configuration file.
.br
The syntax is available at https://wiki.gpac.io/xmlformats/Common-Encryption
.br
The DRM config file can be set per PID using the property DecryptInfo (highest priority), CryptInfo (lower priority) or set at the filter level using .I cfile (lowest priority).
.br
When the file is set per PID, the first CryptInfo with the same ID is used, otherwise the first CryptInfo is used.When the file is set globally (not per PID), the first CrypTrack in the DRM config file with the same ID is used, otherwise the first CrypTrack with ID 0 or not set is used.
.br

.br
.SH Options (expert):
.LP
.br
cfile (str):                   crypt file location
.br
decrypt (enum, default: full): decrypt mode (CENC only)
.br
* full: decrypt everything, throwing error if keys are not found
.br
* nokey: decrypt everything for which a key is found, skip decryption otherwise
.br
* skip: decrypt nothing
.br
* pad0: decrypt nothing and replace all crypted bits with 0
.br
* pad1: decrypt nothing and replace all crypted bits with 1
.br
* padsc: decrypt nothing and replace all crypted bytes with start codes
.br

.br
drop_keys (uintl):             consider keys with given 1-based indexes as not available (multi-key debug)
.br
kids (strl):                   define KIDs. If keys is empty, consider keys with given KID (as hex string) as not available (debug)
.br
keys (strl):                   define key values for each of the specified KID
.br
hls_cenc_patch_iv (bool, default: false): ignore IV updates in some broken HLS+CENC streams
.br

.br
.SH cecrypt
.LP
.br
Description: CENC encryptor
.br

.br
The CENC encryptor supports CENC, ISMA and Adobe encryption. It uses a DRM config file for declaring keys.
.br
The syntax is available at https://wiki.gpac.io/xmlformats/Common-Encryption
.br
The DRM config file can be set per PID using the property CryptInfo, or set at the filter level using .I cfile.
.br
When the DRM config file is set per PID, the first CrypTrack in the DRM config file with the same ID is used, otherwise the first CrypTrack is used (regardless of the CrypTrack ID).
.br
When the DRM config file is set globally (not per PID), the first CrypTrack in the DRM config file with the same ID is used, otherwise the first CrypTrack with ID 0 or not set is used.
.br
If no DRM config file is defined for a given PID, this PID will not be encrypted, or an error will be thrown if .I allc is specified.
.br

.br
.SH Options (expert):
.LP
.br
cfile (str):                   crypt file location
.br
allc (bool):                   throw error if no DRM config file is found for a PID
.br
bk_stats (bool):               print number of encrypted blocks to stdout upon exit
.br
bk_skip (bool):                skip encryption but performs all other tasks (test mode)
.br

.br
.SH mp4mx
.LP
.br
Description: ISOBMFF/QT multiplexer
.br

.br
This filter multiplexes streams to ISOBMFF (14496-12 and derived specifications) or QuickTime
.br
  
.br
.SH Tracks and Items
.LP
.br
By default all input PIDs with ItemID property set are multiplexed as items, otherwise they are multiplexed as tracks.
.br
To prevent source items to be multiplexed as items, use .I -itemid option from ISOBMFF demultiplexer.
.br
Example
.br
gpac -i source.mp4:itemid=false -o file.mp4
.br

.br
  
.br
To force non-item streams to be multiplexed as items, use #ItemID option on that PID:
.br
.br
gpac -i source.jpg:#ItemID=1 -o file.mp4
.br

.br
  
.br
.SH Storage
.LP
.br
The .I store option allows controlling if the file is fragmented or not, and when not fragmented, how interleaving is done. For cases where disk requirements are tight and fragmentation cannot be used, it is recommended to use either flat or fstart modes.
.br
  
.br
The .I vodcache option allows controlling how DASH onDemand segments are generated:
.br
- If set to on, file data is stored to a temporary file on disk and flushed upon completion, no padding is present.
.br
- If set to insert, SIDX/SSIX will be injected upon completion of the file by shifting bytes in file. In this case, no padding is required but this might not be compatible with all output sinks and will take longer to write the file.
.br
- If set to replace, SIDX/SSIX size will be estimated based on duration and DASH segment length, and padding will be used in the file before the final SIDX. If input PIDs have the properties DSegs set, this will used be as the number of segments.
.br
The on and insert modes will produce exactly the same file, while the mode replace may inject a free box before the sidx.
.br
  
.br
.SH Custom boxes
.LP
.br
Custom boxes can be specified as box patches:
.br
For movie-level patch, the .I boxpatch option of the filter should be used.
.br
Per PID box patch can be specified through the PID property boxpatch.
.br
Example
.br
gpac -i source:#boxpatch=myfile.xml -o mux.mp4
.br

.br
Per Item box patch can be specified through the PID property boxpatch.
.br
Example
.br
gpac -i source:1ItemID=1:#boxpatch=myfile.xml -o mux.mp4
.br

.br
  
.br
The box patch is applied before writing the initial moov box in fragmented mode, or when writing the complete file otherwise.
.br
The box patch can either be a filename or the full XML string.
.br
  
.br
.SH Tagging
.LP
.br
When tagging is enabled, the filter will watch the property CoverArt and all custom properties on incoming PID.
.br
The built-in tag names are indicated by MP4Box -h tags.
.br
QT tags can be specified using qtt_NAME property names, and will be added using formatting specified in MP4Box -h tags.
.br
Other tag class may be specified using tag_NAME property names, and will be added if .I itags is set to all using:
.br
- NAME as a box 4CC if NAME is four characters long
.br
- NAME as a box 4CC if NAME is 3 characters long, and will be prefixed by 0xA9
.br
- the CRC32 of the NAME as a box 4CC if NAME is not four characters long
.br
  
.br
Property names formatted as cust_NAME@MEAN are added as a custom tag with name NAME and mean MEAN. Both NAME and MEAN can be empty.
.br
.SH User data
.LP
.br
The filter will look for the following PID properties to create user data entries:
.br
* `udtab`: set the track user-data box to the property value which must be a serialized box array blob
.br
* `mudtab`: set the movie user-data box to the property value which must be a serialized box array blob
.br
* `udta_U4CC`: set track user-data box entry of type U4CC to property value
.br
* `mudta_U4CC`: set movie user-data box entry of type U4CC to property value
.br
* `tkgp_T4CC`: set/remove membership to track group with type T4CC and ID given by property value. A negative value N removes from track group with ID -N
.br
  
.br
Example
.br
gpac -i src.mp4:#udta_tagc='My Awesome Tag' -o tag.mp4
.br
gpac -i src.mp4:#mudtab=data@box.bin -o tag.mp4
.br

.br
  
.br
.SH Custom sample group descriptions and sample auxiliary info
.LP
.br
The filter watches the following custom data properties on incoming packets:
.br
* `grp_A4CC`: maps packet to sample group description of type A4CC and entry set to property payload
.br
* `grp_A4CC_param`: same as above and sets sample to group grouping_type_parameter to param
.br
* `sai_A4CC`: adds property payload as sample auxiliary information of type A4CC
.br
* `sai_A4CC_param`: same as above and sets aux_info_type_parameterto param
.br
  
.br
The property grp_EMSG consists in one or more EventMessageBox as defined in MPEG-DASH.
.br
- in fragmented mode, presence of this property in a packet will start a new fragment, with the boxes written before the moof
.br
- in regular mode, an internal sample group of type EMSG is currently used for emsg box storage
.br
  
.br
.SH Notes
.LP
.br
The filter watches the property FileNumber on incoming packets to create new files (regular mode) or new segments (DASH mode).
.br
  
.br
The filter watches the property DSIWrap (4CC as int or string) on incoming PID to wrap decoder configuration in a box of given type (unknown wrapping)
.br
Example
.br
-i unkn.mkv:#ISOMSubtype=VIUK:#DSIWrap=cfgv -o t.mp4
.br

.br
This will wrap the unknown stream using VIUK code point in stsd and wrap any decoder configuration data in a cfgv box.
.br

.br
If .I pad_sparse is set, the filter watches the property Sparse on incoming PID to decide whether empty packets should be injected to keep packet duration info.
.br
Such packets are only injected when a whole in the timeline is detected.
.br
- if Sparse is absent, empty packet is inserted for unknown text and metadata streams
.br
- if Sparse is true, empty packet is inserted for all stream types
.br
- if Sparse is false, empty packet is never injected
.br
  
.br
The default media type used for a PID can be overriden using property StreamSubtype. 
.br
Example
.br
-i src.srt:#StreamSubtype=sbtl [-i ...]  -o test.mp4 
.br

.br
This will force the text stream to use sbtl handler type instead of default text one.
.br
Subtitle streams may be used as chapters by setting the property IsChap on the desired PID.
.br
Example
.br
-i src.srt:#IsChap  [-i ...] -o test.mp4 
.br

.br
This will force the text stream to be used as a QT chapter track.  
.br

.br
.SH Options (expert):
.LP
.br
m4sys (bool, default: false):  force MPEG-4 Systems signaling of tracks
.br
dref (bool, default: false):   only reference data from source file - not compatible with all media sources
.br
ctmode (enum, default: auto):  set composition offset mode for video tracks
.br
* auto: if fragmenting an ISOBMFF source, use source settings otherwise resolve to edit
.br
* edit: uses edit lists to shift first frame to presentation time 0
.br
* noedit: ignore edit lists and does not shift timeline
.br
* negctts: uses ctts v1 with possibly negative offsets and no edit lists
.br

.br
dur (frac, default: 0):        only import the specified duration. If negative, specify the number of coded frames to import
.br
pack3gp (uint, default: 1):    pack a given number of 3GPP audio frames in one sample
.br
importer (bool, default: false): compatibility with old importer, displays import progress
.br
pack_nal (bool, default: false): repack NALU size length to minimum possible size for NALU-based video (AVC/HEVC/...)
.br
xps_inband (enum, default: no): use inband (in sample data) parameter set for NALU-based video (AVC/HEVC/...)
.br
* no: parameter sets are not inband, several sample descriptions might be created
.br
* pps: picture parameter sets are inband, all other parameter sets are in sample description
.br
* all: parameter sets are inband, no parameter sets in sample description
.br
* both: parameter sets are inband, signaled as inband, and also first set is kept in sample description
.br
* mix: creates non-standard files using single sample entry with first PSs found, and moves other PS inband
.br
* auto: keep source config, or defaults to no if source is not ISOBMFF
.br

.br
store (enum, default: inter):  file storage mode
.br
* inter: perform precise interleave of the file using .I cdur (requires temporary storage of all media)
.br
* flat: write samples as they arrive and moov at end (fastest mode)
.br
* fstart: write samples as they arrive and moov before mdat
.br
* tight: uses per-sample interleaving of all tracks (requires temporary storage of all media)
.br
* frag: fragments the file using cdur duration
.br
* sfrag: fragments the file using cdur duration but adjusting to start with SAP1/3
.br

.br
cdur (frac, default: -1/1):    chunk duration for flat and interleaving modes or fragment duration for fragmentation modes
.br
* 0: no specific interleaving but moov first
.br
* negative: defaults to 1.0 unless overridden by storage profile
.br

.br
moovts (sint, default: 600):   timescale to use for movie. A negative value picks the media timescale of the first track added
.br
moof_first (bool, default: true): generate fragments starting with moof then mdat
.br
abs_offset (bool, default: false): use absolute file offset in fragments rather than offsets from moof
.br
fsap (bool, default: true):    split truns in video fragments at SAPs to reduce file size
.br
subs_sidx (sint, default: -1): number of subsegments per sidx
.br
* 0: single sidx
.br
* >0: hierarchical or daisy-chained sidx
.br
* <0: disables sidx
.br
* -2: removes sidx if present in source PID
.br

.br
m4cc (str):                    4 character code of empty box to append at the end of a segment (DASH mode) or of a fragment (non-DASH mode)
.br
chain_sidx (bool, default: false): use daisy-chaining of SIDX
.br
msn (uint, default: 1):        sequence number of first moof to N
.br
msninc (uint, default: 1):     sequence number increase between moof boxes
.br
tfdt (lfrac, default: 0):      set initial decode time (tfdt) of first traf
.br
tfdt_traf (bool, default: false): force tfdt box in each traf
.br
nofragdef (bool, default: false): disable default flags in fragments
.br
straf (bool, default: false):  use a single traf per moof (smooth streaming and co)
.br
strun (bool, default: false):  use a single trun per traf (smooth streaming and co)
.br
prft (bool, default: true):    set prft box at segment start, disabled if not fragmented mode
.br
psshs (enum, default: moov):   set pssh boxes store mode
.br
* moof: in first moof of each segments
.br
* moov: in movie box
.br
* both: in movie box and in first moof of each segment
.br
* none: pssh is discarded
.br

.br
sgpd_traf (bool, default: false): store sample group descriptions in traf (duplicated for each traf). If not used, sample group descriptions are stored in the movie box
.br
vodcache (enum, default: replace): enable temp storage for VoD dash modes
.br
* on: use temp storage of complete file for sidx and ssix injection
.br
* insert: insert sidx and ssix by shifting bytes in output file
.br
* replace: precompute pace requirements for sidx and ssix and rewrite file range at end
.br

.br
noinit (bool, default: false): do not produce initial moov, used for DASH bitstream switching mode
.br
tktpl (enum, default: yes):    use track box from input if any as a template to create new track
.br
* no: disables template
.br
* yes: clones the track (except edits and decoder config)
.br
* udta: only loads udta
.br

.br
mudta (enum, default: yes):    use udta and other moov extension boxes from input if any
.br
* no: disables import
.br
* yes: clones all extension boxes
.br
* udta: only loads udta
.br

.br
mvex (bool, default: false):   set mvex boxes after trak boxes
.br
sdtp_traf (enum, default: no): use sdtp box in traf box rather than using flags in trun sample entries
.br
* no: do not use sdtp
.br
* sdtp: use sdtp box to indicate sample dependencies and do not write info in trun sample flags
.br
* both: use sdtp box to indicate sample dependencies and also write info in trun sample flags
.br

.br
trackid (uint, default: 0):    track ID of created track for single track. Default 0 uses next available trackID
.br
fragdur (bool, default: false): fragment based on fragment duration rather than CTS. Mostly used for MP4Box -frag option
.br
btrt (bool, default: true):    set btrt box in sample description
.br
styp (str):                    set segment styp major brand (and optionally version) to the given 4CC[.version]
.br
lmsg (bool, default: false):   set lmsg brand for the last segment or fragment
.br
mediats (sint, default: 0):    set media timescale. A value of 0 means inherit from PID, a value of -1 means derive from samplerate or frame rate
.br
ase (enum, default: v0):       set audio sample entry mode for more than stereo layouts
.br
* v0: use v0 signaling but channel count from stream, recommended for backward compatibility
.br
* v0s: use v0 signaling and force channel count to 2 (stereo) if more than 2 channels
.br
* v1: use v1 signaling, ISOBMFF style (will mux raw PCM as ISOBMFF style)
.br
* v1qt: use v1 signaling, QTFF style
.br
* v2qt: use v2 signaling, QTFF style (lpcm entry type)
.br

.br
ssix (bool, default: false):   create ssix box when sidx box is present, level 1 mapping I-frames byte ranges, level 0xFF mapping the rest
.br
ccst (bool, default: false):   insert coding constraint box for video tracks
.br
maxchunk (uint, default: 0):   set max chunk size in bytes for runs (only used in non-fragmented mode). 0 means no constraints
.br
noroll (bool, default: false): disable roll sample grouping
.br
norap (bool, default: false):  disable rap sample grouping
.br
saio32 (bool, default: false): use 32 bit offset for side data location instead of 64 bit offset
.br
tfdt64 (bool, default: false): use 64 bit tfdt and sidx even for 32 bits timestamps
.br
compress (enum, default: no):  set top-level box compression mode
.br
* no: disable box compression
.br
* moov: compress only moov box (uses cmov for QT)
.br
* moof: compress only moof boxes
.br
* sidx: compress moof and sidx boxes
.br
* ssix: compress moof, sidx and ssix boxes
.br
* all: compress moov, moof, sidx and ssix boxes
.br

.br
fcomp (bool, default: false):  force using compress box even when compressed size is larger than uncompressed
.br
otyp (bool, default: false):   inject original file type when using compressed boxes
.br
trun_inter (bool, default: false): interleave samples in trun based on the temporal level, the lowest level are stored first (this will create as many trun boxes as required)
.br
truns_first (bool, default: false): store track runs before sample group description and sample encryption information
.br
block_size (uint, default: 10000): target output block size, 0 for default internal value (10k)
.br
boxpatch (str):                apply box patch before writing
.br
deps (bool, default: true):    add samples dependencies information
.br
mfra (bool, default: false):   enable movie fragment random access when fragmenting (ignored when dashing)
.br
forcesync (bool, default: false): force all SAP types to be considered sync samples (might produce non-compliant files)
.br
refrag (bool, default: false): use track fragment defaults from initial file if any rather than computing them from PID properties (used when processing standalone segments/fragments)
.br
itags (enum, default: strict): tag injection mode
.br
* none: do not inject tags
.br
* strict: only inject recognized itunes tags
.br
* all: inject all possible tags
.br

.br
keep_utc (bool, default: false): force all new files and tracks to keep the source UTC creation and modification times
.br
pps_inband (bool, default: no): when .I xps_inband is set, inject PPS in each non SAP 1/2/3 sample
.br
moovpad (uint, default: 0):    insert free box of given size after moov for future in-place editing
.br
cmaf (enum, default: no):      use CMAF guidelines (turns on mvex, truns_first, strun, straf, tfdt_traf, chain_sidx and restricts subs_sidx to -1 or 0)
.br
* no: CMAF not enforced
.br
* cmfc: use CMAF cmfc guidelines
.br
* cmf2: use CMAF cmf2 guidelines (turns on nofragdef)
.br

.br
pad_sparse (bool, default: true): inject sample with no data (size 0) to keep durations in unknown sparse text and metadata tracks
.br
force_dv (bool, default: false): force DV sample entry types even when AVC/HEVC compatibility is signaled
.br
dvsingle (bool, default: false): ignore DolbyVision profile 8 in xps inband mode if profile 5 is already set
.br
tsalign (bool, default: true): enable timeline realignment to 0 for first sample - if false, this will keep original timing with empty edit (possibly long) at begin
.br
chapm (enum, default: both):   chapter storage mode
.br
* off: disable chapters
.br
* tk: use chapter track (QT-style)
.br
* udta: use user-data box chapters
.br
* both: use both chapter tracks and udta
.br

.br
patch_dts (bool, default: false): patch previous samples duration when dts do not increase monotonically
.br
uncv (enum, default: prof):    use uncv (ISO 23001-17) for raw video
.br
* off: disabled (always the case when muxing to QT)
.br
* gen: enabled, do not write profile
.br
* prof: enabled and write profile if known
.br
* tiny: enabled and write reduced version if profile known and compatible
.br

.br
trunv1 (bool, default: false): force using version 1 of trun regardless of media type or CMAF brand
.br
rsot (bool, default: false):   inject redundant sample timing information when present
.br

.br
.SH rfqcp
.LP
.br
Description: QCP reframer
.br

.br
This filter parses QCP files/data and outputs corresponding audio PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
index (dbl, default: 1.0):     indexing window length
.br

.br
.SH rfh263
.LP
.br
Description: H263 reframer
.br

.br
This filter parses H263 files/data and outputs corresponding visual PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
fps (frac, default: 15000/1000): import frame rate
.br
index (dbl, default: 1.0):     indexing window length
.br
notime (bool, default: false): ignore input timestamps, rebuild from 0
.br

.br
.SH rfmpgvid
.LP
.br
Description: M1V/M2V/M4V reframer
.br

.br
This filter parses MPEG-1/2 and MPEG-4 part 2 video files/data and outputs corresponding video PID and frames.
.br
Note: The filter uses negative CTS offsets: CTS is correct, but some frames may have DTS greater than CTS.
.br

.br
.SH Options (expert):
.LP
.br
fps (frac, default: 0/1000):   import frame rate (0 default to FPS from bitstream or 25 Hz)
.br
index (dbl, default: -1.0):    indexing window length. If 0, bitstream is not probed for duration. A negative value skips the indexing if the source file is larger than 20M (slows down importers) unless a play with start range > 0 is issued
.br
vfr (bool, default: false):    set variable frame rate import
.br
importer (bool, default: false): compatibility with old importer, displays import results
.br
notime (bool, default: false): ignore input timestamps, rebuild from 0
.br

.br
.SH nhntr
.LP
.br
Description: NHNT reader
.br

.br
This filter reads NHNT files/data to produce a media PID and frames.
.br
NHNT documentation is available at https://wiki.gpac.io/xmlformats/NHNT-Format
.br

.br
.SH Options (expert):
.LP
.br
reframe (bool, default: false): force re-parsing of referenced content
.br
index (dbl, default: 1.0):     indexing window length
.br

.br
.SH nhmlr
.LP
.br
Description: NHML reader
.br

.br
This filter reads NHML files/data to produce a media PID and frames.
.br
NHML documentation is available at https://wiki.gpac.io/xmlformats/NHML-Format
.br

.br
.SH Options (expert):
.LP
.br
reframe (bool, default: false): force re-parsing of referenced content
.br
index (dbl, default: 1.0):     indexing window length
.br

.br
.SH rfnalu
.LP
.br
Description: AVC/HEVC reframer
.br

.br
This filter parses AVC|H264 and HEVC files/data and outputs corresponding video PID and frames.
.br
This filter produces ISOBMFF-compatible output: start codes are removed, NALU length field added and avcC/hvcC config created.
.br
Note: The filter uses negative CTS offsets: CTS is correct, but some frames may have DTS greater than CTS.
.br

.br
.SH Options (expert):
.LP
.br
fps (frac, default: 0/1000):   import frame rate (0 default to FPS from bitstream or 25 Hz)
.br
index (dbl, default: -1.0):    indexing window length. If 0, bitstream is not probed for duration. A negative value skips the indexing if the source file is larger than 20M (slows down importers) unless a play with start range > 0 is issued
.br
explicit (bool, default: false): use explicit layered (SVC/LHVC) import
.br
force_sync (bool, default: false): force sync points on non-IDR samples with I slices (not compliant)
.br
strict_poc (enum, default: off): delay frame output of an entire GOP to ensure CTS info is correct when POC suddenly changes
.br
* off: disable GOP buffering
.br
* on: enable GOP buffering, assuming no error in POC
.br
* error: enable GOP buffering and try to detect lost frames
.br

.br
nosei (bool, default: false):  remove all sei messages
.br
nosvc (bool, default: false):  remove all SVC/MVC/LHVC data
.br
novpsext (bool, default: false): remove all VPS extensions
.br
importer (bool, default: false): compatibility with old importer, displays import results
.br
nal_length (uint, default: 4): set number of bytes used to code length field: 1, 2 or 4
.br
subsamples (bool, default: false): import subsamples information
.br
deps (bool, default: false):   import sample dependency information
.br
refs (bool, default: false):   import sample reference picture list (currently only for HEVC and VVC)
.br
seirw (bool, default: true):   rewrite AVC sei messages for ISOBMFF constraints
.br
audelim (bool, default: false): keep Access Unit delimiter in payload
.br
notime (bool, default: false): ignore input timestamps, rebuild from 0
.br
dv_mode (enum, default: auto): signaling for DolbyVision
.br
* none: never signal DV profile
.br
* auto: signal DV profile if RPU or EL are found
.br
* clean: do not signal and remove RPU and EL NAL units
.br
* single: signal DV profile if RPU are found and remove EL NAL units
.br

.br
dv_profile (uint, default: 0): profile for DolbyVision (currently defined profiles are 4, 5, 7, 8, 9), 0 for auto-detect
.br
dv_compatid (enum, default: auto): cross-compatibility ID for DolbyVision
.br
* auto: auto-detect
.br
* none: no cross-compatibility
.br
* hdr10: CTA HDR10, as specified by EBU TR 03
.br
* bt709: SDR BT.709
.br
* hlg709: HLG BT.709 gamut in ITU-R BT.2020
.br
* hlg2100: HLG BT.2100 gamut in ITU-R BT.2020
.br
* bt2020: SDR BT.2020
.br
* brd: Ultra HD Blu-ray Disc HDR
.br

.br
bsdbg (enum, default: off):    debug NAL parsing in media@debug logs
.br
* off: not enabled
.br
* on: enabled
.br
* full: enable with number of bits dumped
.br

.br

.br
.SH m2psdmx
.LP
.br
Description: MPEG PS demultiplexer
.br

.br
This filter demultiplexes MPEG-2 program streams to produce media PIDs and frames.
.br

.br
No options
.br

.br
.SH avidmx
.LP
.br
Description: AVI demultiplexer
.br

.br
This filter demultiplexes AVI files to produce media PIDs and frames.
.br

.br
.SH Options (expert):
.LP
.br
fps (frac, default: 1/0):      import frame rate, default is AVI one
.br
importer (bool, default: false): compatibility with old importer, displays import results
.br
noreframe (bool, default: false): skip media reframer
.br

.br
.SH txtin
.LP
.br
Description: Subtitle loader
.br

.br
This filter reads subtitle data from input PID to produce subtitle frames on a single PID.
.br
The filter supports the following formats:
.br
* SRT: https://en.wikipedia.org/wiki/SubRip
.br
* WebVTT: https://www.w3.org/TR/webvtt1/
.br
* TTXT: https://wiki.gpac.io/xmlformats/TTXT-Format-Documentation
.br
* QT 3GPP Text XML (TexML): Apple QT6, likely deprecated
.br
* TTML: https://www.w3.org/TR/ttml2/
.br
* SUB: one subtitle per line formatted as {start_frame}{end_frame}text
.br
* SSA (Substation Alpha): basic parsing support for common files
.br

.br
Input files must be in UTF-8 or UTF-16 format, with or without BOM. The internal frame format is: 
.br
* WebVTT (and srt if desired): ISO/IEC 14496-30 VTT cues
.br
* TTML: ISO/IEC 14496-30 XML subtitles
.br
* stxt and sbtt: ISO/IEC 14496-30 text stream and text subtitles
.br
* Others: 3GPP/QT Timed Text
.br

.br
.SH TTML Support
.LP
.br
If .I ttml_split option is set, the TTML document is split in independent time segments by inspecting all overlapping subtitles in the body.
.br
Empty periods in TTML will result in empty TTML documents or will be skipped if .I no_empty option is set.
.br

.br
The first sample has a CTS assigned as indicated by .I ttml_cts:
.br
- a numerator of -2 indicates the first CTS is 0
.br
- a numerator of -1 indicates the first CTS is the first active time in document
.br
- a numerator >= 0 indicates the CTS to use for first sample
.br

.br
When TTML splitting is disabled, the duration of the TTML sample is given by .I ttml_dur if not 0, or set to the document duration
.br

.br
By default, media resources are kept as declared in TTML2 documents.
.br

.br
.I ttml_embed can be used to embed inside the TTML sample the resources in <head> or <body>:
.br
- for <source>, <image>, <audio>, <font>, local URIs indicated in src will be loaded and src rewritten.
.br
- for <data> with base64 coding, the data will be decoded, <data> element removed and parent <source> rewritten with src attribute inserted.
.br

.br
The embedded data is added as a subsample to the TTML frame, and the referring elements will use src=urn:mpeg:14496-30:N with N the index of the subsample.
.br

.br
A subtitle zero may be specified using .I ttml_zero. This will remove all subtitles before the given time T0, and rewrite each subtitle begin/end T to T-T0 using millisecond accuracy.
.br
Warning: Original time formatting (tick, frames/subframe ...) will be lost when this option is used, converted to HH:MM:SS.ms.
.br

.br
The subtitle zero time must be prefixed with T when the option is not set as a global argument:
.br
.br
gpac -i test.ttml:ttml_zero=T10:00:00 [...]
.br
MP4Box -add test.ttml:sopt:ttml_zero=T10:00:00 [...]
.br
gpac -i test.ttml --ttml_zero=10:00:00 [...]
.br
gpac -i test.ttml --ttml_zero=T10:00:00 [...]
.br
MP4Box -add test.ttml --ttml_zero=10:00:00 [...]
.br

.br

.br
.SH Simple Text Support
.LP
.br
The text loader can convert input files in simple text streams of a single packet, by forcing the codec type on the input:
.br
.br
gpac -i test.txt:#CodecID=stxt  [...]
.br
gpac fin:pck="Text Data":#CodecID=stxt  [...]
.br

.br

.br
The content of the source file will be the payload of the text sample. The .I stxtmod option allows specifying WebVTT, TX3G or simple text mode for output format.
.br
In this mode, the .I stxtdur option is used to control the duration of the generated subtitle:
.br
- a positive value always forces the duration
.br
- a negative value forces the duration if input packet duration is not known
.br

.br
.SH Notes
.LP
.br
When reframing simple text streams from demuxers (e.g. subtitles from MKV), the output format of these streams can be selected using .I stxtmod.
.br

.br
When importing SRT, SUB or SSA files, the output format of the PID can be selected using .I stxtmod.
.br

.br
.SH Options (expert):
.LP
.br
nodefbox (bool, default: false): skip default text box
.br
noflush (bool, default: false): skip final sample flush for srt
.br
fontname (str):                default font
.br
fontsize (uint, default: 18):  default font size
.br
lang (str):                    default language
.br
width (uint, default: 0):      default width of text area
.br
height (uint, default: 0):     default height of text area
.br
txtx (uint, default: 0):       default horizontal offset of text area: -1 (left), 0 (center) or 1 (right)
.br
txty (uint, default: 0):       default vertical offset of text area: -1 (bottom), 0 (center) or 1 (top)
.br
zorder (sint, default: 0):     default z-order of the PID
.br
timescale (uint, default: 1000): default timescale of the PID
.br
ttml_split (bool, default: true): split ttml doc in non-overlapping samples
.br
ttml_cts (lfrac, default: -1/1): first sample cts - see filter help
.br
ttml_dur (frac, default: 0/1): sample duration when not spliting split - see filter help
.br
ttml_embed (bool, default: false): force embedding TTML resources
.br
ttml_zero (str):               set subtitle zero time for TTML
.br
no_empty (bool, default: false): do not send empty samples
.br
stxtdur (frac, default: 1):    duration for simple text
.br
stxtmod (enum, default: tx3g): text stream mode for simple text streams and SRT inputs
.br
* stxt: output PID formatted as simple text stream (remove markup in VTT/SRT payload)
.br
* sbtt: output PID formatted as subtitle text stream (keep markup in VTT/SRT payload)
.br
* tx3g: output PID formatted as TX3G/Apple stream
.br
* vtt: output PID formatted as WebVTT stream
.br
* webvtt: same as vtt (for backward compatiblity
.br

.br

.br
.SH ttxtdec
.LP
.br
Description: TTXT/TX3G decoder
.br

.br
This filter decodes TTXT/TX3G streams into a BIFS scene graph of the compositor filter.
.br
The TTXT documentation is available at https://wiki.gpac.io/xmlformats/TTXT-Format-Documentation
.br

.br
In stand-alone rendering (no associated video), the filter will use:
.br
- Width and Height properties of input pid if any
.br
- otherwise, osize option of compositor if set
.br
- otherwise, .I txtw and .I txth
.br

.br
.SH Options (expert):
.LP
.br
texture (bool, default: false): use texturing for output text
.br
outline (bool, default: false): draw text outline
.br
txtw (uint, default: 400):     default width in standalone rendering
.br
txth (uint, default: 200):     default height in standalone rendering
.br

.br
.SH vttdec
.LP
.br
Description: WebVTT decoder
.br

.br
This filter decodes WebVTT streams into a SVG scene graph of the compositor filter.
.br
The scene graph creation is done through JavaScript.
.br
The filter options are used to override the JS global variables of the WebVTT renderer.
.br
In stand-alone rendering (no associated video), the filter will use:
.br
- Width and Height properties of input pid if any
.br
- otherwise, osize option of compositor if set
.br
- otherwise, .I txtw and .I txth
.br

.br
.SH Options (expert):
.LP
.br
script (str, default: $GSHARE/scripts/webvtt-renderer.js): location of WebVTT SVG JS renderer
.br
font (str, default: SANS, updatable): font
.br
fontSize (flt, default: 20, updatable): font size
.br
color (str, default: white, updatable): text color
.br
lineSpacing (flt, default: 1.0, updatable): line spacing as scaling factor to font size
.br
txtw (uint, default: 400):     default width in standalone rendering
.br
txth (uint, default: 200):     default height in standalone rendering
.br

.br
.SH ttmldec
.LP
.br
Description: TTML decoder
.br

.br
This filter decodes TTML streams into a SVG scene graph of the compositor filter.
.br
The scene graph creation is done through JavaScript.
.br
The filter options are used to override the JS global variables of the TTML renderer.
.br

.br
In stand-alone rendering (no associated video), the filter will use:
.br
- Width and Height properties of input pid if any
.br
- otherwise, osize option of compositor if set
.br
- otherwise, .I txtw and .I txth
.br

.br
.SH Options (expert):
.LP
.br
script (str, default: $GSHARE/scripts/ttml-renderer.js): location of TTML SVG JS renderer
.br
font (str, default: SANS, updatable): font
.br
fontSize (flt, default: 20, updatable): font size
.br
color (str, default: white, updatable): text color
.br
valign (enum, default: bottom, updatable): vertical alignment
.br
* bottom: align text at bottom of text area
.br
* center: align text at center of text area
.br
* top: align text at top of text area
.br

.br
lineSpacing (flt, default: 1.0, updatable): line spacing as scaling factor to font size
.br
txtw (uint, default: 400):     default width in standalone rendering
.br
txth (uint, default: 200):     default height in standalone rendering
.br

.br
.SH rtpin
.LP
.br
Description: RTP/RTSP/SDP input
.br

.br
This filter handles SDP/RTSP/RTP input reading. It supports:
.br
- SDP file reading
.br
- RTP direct url through rtp:// protocol scheme
.br
- RTSP session processing through rtsp:// and satip:// protocol schemes
.br
 
.br
The filter produces either PIDs with media frames, or file PIDs with multiplexed data (e.g. MPEG-2 TS). 
.br
The filter will use:
.br
- RTSP over HTTP tunnel if server port is 80 or 8080 or if protocol scheme is rtsph://.
.br
- RTSP over TLS if server port is 322 or if protocol scheme is rtsps://.
.br
- RTSP over HTTPS tunnel if server port is 443 and if protocol scheme is rtsph://.
.br
 
.br
The filter will attempt reconnecting in TLS mode after two consecutive initial connection failures.
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    location of source content (SDP, RTP or RTSP URL)
.br
firstport (uint, default: 0):  default first port number to use (0 lets the filter decide)
.br
ifce (str):                    default interface IP to use for multicast. If NULL, the default system interface will be used
.br
ttl (uint, default: 127, minmax: 0-127): multicast TTL
.br
reorder_len (uint, default: 1000): reorder length in packets
.br
reorder_delay (uint, default: 50): max delay in RTP re-orderer, packets will be dispatched after that
.br
block_size (uint, default: 0x100000): buffer size for RTP/UDP or RTSP when interleaved
.br
disable_rtcp (bool, default: false): disable RTCP reporting
.br
nat_keepalive (uint, default: 0): delay in ms of NAT keepalive, disabled by default (except for SatIP, set to 30s by default)
.br
force_mcast (str):             force multicast on indicated IP in RTSP setup
.br
use_client_ports (bool, default: false): force using client ports (hack for some RTSP servers overriding client ports)
.br
bandwidth (uint, default: 0):  set bandwidth param for RTSP requests
.br
default_port (uint, default: 554, minmax: 0-65535): set default RTSP port
.br
satip_port (uint, default: 1400, minmax: 0-65535): set default port for SATIP
.br
transport (enum, default: auto): set RTP over RTSP
.br
* auto: set interleave on if HTTP tunnel is used, off otherwise and retry in interleaved mode if UDP timeout
.br
* tcp: enable RTP over RTSP
.br
* udp: disable RTP over RTSP
.br

.br
udp_timeout (uint, default: 10000): default timeout before considering UDP is down
.br
rtcp_timeout (uint, default: 5000): default timeout for RTCP traffic in ms. After this timeout, playback will start out of sync. If 0 always wait for RTCP
.br
first_packet_drop (uint, default: 0, updatable): set number of first RTP packet to drop (0 if no drop)
.br
frequency_drop (uint, default: 0, updatable): drop 1 out of N packet (0 disable dropping)
.br
loss_rate (sint, default: -1, updatable): loss rate to signal in RTCP, -1 means real loss rate, otherwise a per-thousand of packet lost
.br
user_agent (str, default: $GUA): user agent string, by default solved from GPAC preferences
.br
languages (str, default: $GLANG): user languages, by default solved from GPAC preferences
.br
stats (uint, default: 500):    update statistics to the user every given MS (0 disables reporting)
.br
max_sleep (sint, default: 1000): set max sleep in milliseconds:
.br
- a negative value -N means to always sleep for N ms
.br
- a positive value N means to sleep at most N ms but will sleep less if frame duration is shorter
.br

.br
rtcpsync (bool, default: true): use RTCP to adjust synchronization
.br
forceagg (bool, default: false): force RTSP control aggregation (patch for buggy servers)
.br
ssm (strl):                    list of IP to include for source-specific multicast
.br
ssmx (strl):                   list of IP to exclude for source-specific multicast
.br

.br
.SH fout
.LP
.br
Description: File output
.br

.br
This filter is used to write data to disk, and does not produce any output PID.
.br
In regular mode, the filter only accept PID of type file. It will dump to file incoming packets (stream type file), starting a new file for each packet having a frame_start flag set, unless operating in .I cat mode.
.br
If the output file name is std or stdout, writes to stdout.
.br
The output file name can use gpac templating mechanism, see gpac -h doc.The filter watches the property FileNumber on incoming packets to create new files.
.br

.br
By default output files are created directly, which may lead to issues if concourrent programs attempt to access them.
.br
By enabling .I atomic, files will be created in target destination folder with the .gftmp suffix and move to their final name upon close.
.br

.br
.SH Discard sink mode
.LP
.br
When the destination is null, the filter is a sink dropping all input packets.
.br
In this case it accepts ANY type of input PID, not just file ones.
.br

.br
.SH HTTP streaming recording
.LP
.br
When recording a DASH or HLS session, the number of segments to keep per quality can be set using .I max_cache_segs.
.br
- value 0  keeps everything (default behaviour)
.br
- a negative value N will keep -N files regardless of the time-shift buffer value
.br
- a positive value N will keep MAX(N, time-shift buffer) files
.br

.br
Example
.br
gpac -i LIVE_MPD dashin:forward=file -o rec/$File$:max_cache_segs=3
.br

.br
This will force keeping a maximum of 3 media segments while recording the DASH session.
.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    location of destination file
.br
append (bool, default: false): open in append mode
.br
dynext (bool, default: false): indicate the file extension is set by filter chain, not dst
.br
start (dbl, default: 0.0):     set playback start offset. A negative value means percent of media duration with -1 equal to duration
.br
speed (dbl, default: 1.0):     set playback speed when vsync is on. If negative and start is 0, start is set to -1
.br
ext (cstr):                    set extension for graph resolution, regardless of file extension
.br
mime (cstr):                   set mime type for graph resolution
.br
cat (enum, default: none):     cat each file of input PID rather than creating one file per filename
.br
* none: never cat files
.br
* auto: only cat if files have same names
.br
* all: always cat regardless of file names
.br

.br
ow (enum, default: yes):       overwrite output mode when concatenation is not used
.br
* yes: override file if existing
.br
* no: throw error if file existing
.br
* ask: interactive prompt
.br

.br
mvbk (uint, default: 8192):    block size used when moving parts of the file around in patch mode
.br
redund (bool, default: false): keep redundant packet in output file
.br
max_cache_segs (sint, default: 0): maximum number of segments cached per HAS quality when recording live sessions (0 means no limit)
.br
force_null (bool, default: false): force no output regardless of file name
.br
atomic (bool, default: false): use atomic file write for non append modes
.br

.br
.SH uflatm
.LP
.br
Description: LATM rewriter
.br

.br
This filter converts AAC streams into LATM encapsulated data.
.br

.br
.SH Options (expert):
.LP
.br
fdsi (frac, default: 0):       set delay between two LATM Audio Config
.br

.br
.SH ufadts
.LP
.br
Description: ADTS rewriter
.br

.br
This filter converts AAC streams into ADTS encapsulated data.
.br

.br
.SH Options (expert):
.LP
.br
mpeg2 (enum, default: auto):   signal as MPEG2 AAC
.br
* auto: selects based on AAC profile
.br
* no: always signals as MPEG-4 AAC
.br
* yes: always signals as MPEG-2 AAC
.br

.br

.br
.SH ufmhas
.LP
.br
Description: MHAS rewriter
.br

.br
This filter converts MPEG-H Audio streams into MHAS encapsulated data.
.br

.br
.SH Options (expert):
.LP
.br
syncp (bool, default: false):  if set, insert sync packet at each frame, otherwise only at SAP
.br

.br
.SH reframer
.LP
.br
Description: Media reframer
.br

.br
This filter provides various tools on inputs:
.br
- ensure reframing (1 packet = 1 Access Unit)
.br
- optionally force decoding
.br
- real-time regulation
.br
- packet filtering based on SAP types or frame numbers
.br
- time-range extraction and splitting
.br
  
.br
This filter forces input PIDs to be properly framed (1 packet = 1 Access Unit).
.br
It is typically needed to force remultiplexing in file to file operations when source and destination files use the same format.
.br
  
.br
.SH SAP filtering
.LP
.br
The filter can remove packets based on their SAP types using .I saps option.
.br
For example, this can be used to extract only the key frame (SAP 1,2,3) of a video to create a trick mode version.
.br
  
.br
.SH Frame filtering
.LP
.br
This filter can keep only specific Access Units of the source using .I frames option.
.br
For example, this can be used to extract only specific key pictures of a video to create a HEIF collection.
.br
  
.br
.SH Frame decoding
.LP
.br
This filter can force input media streams to be decoded using the .I raw option.
.br
Example
.br
gpac -i m.mp4 reframer:raw=av [dst]
.br

.br
.SH Real-time Regulation
.LP
.br
The filter can perform real-time regulation of input packets, based on their timescale and timestamps.
.br
For example to simulate a live DASH:
.br
.br
gpac -i m.mp4 reframer:rt=on -o live.mpd:dynamic
.br

.br
  
.br
.SH Range extraction
.LP
.br
The filter can perform time range extraction of the source using .I xs and .I xe options.
.br
The formats allowed for times specifiers are:
.br
* 'TC'HH:MM:SS:FF: specify time in timecode
.br
* 'T'H:M:S, 'T'M:S: specify time in hours, minutes, seconds
.br
* 'T'H:M:S.MS, 'T'M:S.MS, 'T'S.MS: specify time in hours, minutes, seconds and milliseconds
.br
* INT, FLOAT, NUM/DEN: specify time in seconds (number or fraction)
.br
* 'D'INT, 'D'FLOAT, 'D'NUM/DEN: specify end time as offset to start time in seconds (number or fraction) - only valid for .I xe
.br
* 'F'NUM: specify time as frame number, 1 being first
.br
* XML DateTime: specify absolute UTC time
.br
  
.br
In this mode, the timestamps are rewritten to form a continuous timeline, unless .I xots is set.
.br
When multiple ranges are given, the filter will try to seek if needed and supported by source.
.br

.br
Example
.br
gpac -i m.mp4 reframer:xs=T00:00:10,T00:01:10,T00:02:00:xe=T00:00:20,T00:01:20 [dst]
.br

.br
This will extract the time ranges [10s,20s], [1m10s,1m20s] and all media starting from 2m
.br

.br
If no end range is found for a given start range:
.br
- if a following start range is set, the end range is set to this next start
.br
- otherwise, the end range is open
.br

.br
Example
.br
gpac -i m.mp4 reframer:xs=0,10,25:xe=5,20 [dst]
.br

.br
This will extract the time ranges [0s,5s], [10s,20s] and all media starting from 25s
.br
Example
.br
gpac -i m.mp4 reframer:xs=0,10,25 [dst]
.br

.br
This will extract the time ranges [0s,10s], [10s,25s] and all media starting from 25s
.br

.br
It is possible to signal range boundaries in output packets using .I splitrange.
.br
This will expose on the first packet of each range in each PID the following properties:
.br
* `FileNumber`: starting at 1 for the first range, to be used as replacement for $num$ in templates
.br
* `FileSuffix`: corresponding to StartRange_EndRange or StartRange for open ranges, to be used as replacement for $FS$ in templates
.br

.br
Example
.br
gpac -i m.mp4 reframer:xs=T00:00:10,T00:01:10:xe=T00:00:20:splitrange -o dump_$FS$.264 [dst]
.br

.br
This will create two output files dump_T00.00.10_T00.02.00.264 and dump_T00.01.10.264.
.br
Note: The : and / characters are replaced by . in FileSuffix property.
.br

.br
It is possible to modify PID properties per range using .I props. Each set of property must be specified using the active separator set.
.br
Warning: The option must be escaped using double separators in order to be parsed properly.
.br
Example
.br
gpac -i m.mp4 reframer:xs=0,30::props=#Period=P1,#Period=P2:#foo=bar [dst]
.br

.br
This will assign to output PIDs
.br
* during the range [0,30]: property Period to P1
.br
* during the range [30, end]: properties Period to P2 and property foo to bar
.br

.br
For uncompressed audio PIDs, input frame will be split to closest audio sample number.
.br

.br
When .I xround is set to seek, the following applies:
.br
- a single range shall be specified
.br
- the first I-frame preceding or matching the range start is used as split point
.br
- all packets before range start are marked as seek points
.br
- packets overlapping range start are forwarded with a SkipBegin property set to the amount of media to skip
.br
- packets overlapping range end are forwarded with an adjusted duration to match the range end
.br
This mode is typically used to extract a range in a frame/sample accurate way, rather than a GOP-aligned way.
.br

.br
When .I xround is not set to seek, compressed audio streams will still use seek mode.
.br
Consequently, these streams will have modified edit lists in ISOBMFF which might not be properly handled by players.
.br
This can be avoided using .I no_audio_seek, but this will introduce audio delay.
.br

.br
.SH UTC-based range extraction
.LP
.br
The filter can perform range extraction based on UTC time rather than media time. In this mode, the end time must be:
.br
* a UTC date: range extraction will stop after this date
.br
* a time in second: range extraction will stop after the specified duration
.br

.br
The UTC reference is specified using .I utc_ref.
.br
If UTC signal from media source is used, the filter will probe for .I utc_probe before considering the source has no UTC signal.
.br

.br
The properties SenderNTP and, if absent, UTC of source packets are checked for establishing the UTC reference.
.br
.SH Other split actions
.LP
.br
The filter can perform splitting of the source using .I xs option.
.br
The additional formats allowed for .I xs option are:
.br
* `SAP`: split source at each SAP/RAP
.br
* `D`VAL: split source by chunks of VAL seconds
.br
* `D`NUM/DEN: split source by chunks of NUM/DEN seconds
.br
* `S`VAL: split source by chunks of estimated size VAL bytes (can use property multipliers, e.g. m)
.br

.br
Note: In these modes, .I splitrange and .I xadjust are implicitly set.
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br
rt (enum, default: off, updatable): real-time regulation mode of input
.br
* off: disables real-time regulation
.br
* on: enables real-time regulation, one clock per PID
.br
* sync: enables real-time regulation one clock for all PIDs
.br

.br
saps (uintl, Enum: 0|1|2|3|4, updatable): list of SAP types (0,1,2,3,4) to forward, other packets are dropped (forwarding only sap 0 will break the decoding)
.br

.br
refs (bool, default: false, updatable): forward only frames used as reference frames, if indicated in the input stream
.br
speed (dbl, default: 0.0, updatable): speed for real-time regulation mode, a value of 0 uses speed from play commands
.br
raw (enum, default: no):       force input AV streams to be in raw format
.br
* no: do not force decoding of inputs
.br
* av: force decoding of audio and video inputs
.br
* a: force decoding of audio inputs
.br
* v: force decoding of video inputs
.br

.br
frames (sintl, updatable):     drop all except listed frames (first being 1). A negative value -V keeps only first frame every V frames
.br
xs (strl):                     extraction start time(s)
.br
xe (strl):                     extraction end time(s). If less values than start times, the last time interval extracted is an open range
.br
xround (enum, default: before): adjust start time of extraction range to I-frame
.br
* before: use first I-frame preceding or matching range start
.br
* seek: see filter help
.br
* after: use first I-frame (if any) following or matching range start
.br
* closest: use I-frame closest to range start
.br

.br
xadjust (bool, default: false): adjust end time of extraction range to be before next I-frame
.br
xots (bool, default: false):   keep original timestamps after extraction
.br
xdts (bool, default: false):   compute start times based on DTS and not CTS
.br
nosap (bool, default: false):  do not cut at SAP when extracting range (may result in broken streams)
.br
splitrange (bool, default: false): signal file boundary at each extraction first packet for template-base file generation
.br
seeksafe (dbl, default: 10.0): rewind play requests by given seconds (to make sure the I-frame preceding start is catched)
.br
tcmdrw (bool, default: true):  rewrite TCMD samples when splitting
.br
props (strl):                  extra output PID properties per extraction range
.br
no_audio_seek (bool, default: false): disable seek mode on audio streams (no change of priming duration)
.br
probe_ref (bool, default: false): allow extracted range to be longer in case of B-frames with reference frames presented outside of range
.br
utc_ref (enum, default: any):  set reference mode for UTC range extraction
.br
* local: use UTC of local host
.br
* any: use UTC of media, or UTC of local host if not found in media after probing time
.br
* media: use UTC of media (abort if none found)
.br
* tc: use timecode
.br

.br
utc_probe (uint, default: 5000): timeout in milliseconds to try to acquire UTC reference from media
.br
copy (bool, default: false, updatable): try copying frame interface into packets
.br
cues (enum, default: no, updatable): cue filtering mode
.br
* no: do no filter frames based on cue info
.br
* segs: only forward frames marked as segment start
.br
* frags: only forward frames marked as fragment start
.br

.br
sapcue (uint, default: 0):     treat SAPs smaller than or equal to this value as cue points
.br
rmseek (bool, default: false, updatable): remove seek flag of all sent packets
.br

.br
.SH writegen
.LP
.br
Description: Stream to File converter
.br

.br
Generic single stream to file converter, used when extracting/converting PIDs.
.br
The writegen filter should usually not be explicitly loaded without a source ID specified, since the filter would likely match any PID connection.
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br
pfmt (pfmt, default: none, Enum: none|yuv420|yvu420|yuv420_10|yuv422|yuv422_10|yuv444|yuv444_10|uyvy|vyuy|yuyv|yvyu|uyvl|vyul|yuyl|yvyl|nv12|nv21|nv1l|nv2l|yuva|yuvd|yuv444a|yuv444p|v308|yuv444ap|v408|v410|v210|grey|algr|gral|rgb4|rgb5|rgb6|rgba|argb|bgra|abgr|rgb|bgr|xrgb|rgbx|xbgr|bgrx|rgbd|rgbds|uncv): pixel format for raw extract. If not set, derived from extension
.br

.br
afmt (afmt, default: none, Enum: none|u8|s16|s16b|s24|s24b|s32|s32b|flt|fltb|dbl|dblb|u8p|s16p|s24p|s32p|fltp|dblp): audio format for raw extract. If not set, derived from extension
.br

.br
decinfo (enum, default: auto): decoder config insert mode
.br
* no: never inserted
.br
* first: inserted on first packet
.br
* sap: inserted at each SAP
.br
* auto: selects between no and first based on media type
.br

.br
split (bool, default: false):  force one file per frame
.br
frame (bool, default: false):  force single frame dump with no rewrite. In this mode, all codec types are supported
.br
sstart (uint, default: 0):     start number of frame to forward. If 0, all samples are forwarded
.br
send (uint, default: 0):       end number of frame to forward. If less than start frame, all samples after start are forwarded
.br
dur (frac, default: 0):        duration of media to forward after first sample. If 0, all samples are forwarded
.br
merge_region (bool, default: false): merge TTML regions with same ID while reassembling TTML doc
.br
vtth (enum, default: seg):     vtt header injection mode
.br
* single: inject only at first frame of the stream
.br
* seg: inject at each non-empty segment
.br
* all: inject at each segment even empty ones
.br

.br
add_nl (bool, default: false): add new line after each packet when dumping text streams
.br
rawb (bool, default: false):   force direct dump of input without framing rewrite. In this mode, all codec types are supported
.br

.br
.SH ufnalu
.LP
.br
Description: AVC/HEVC to AnnexB rewriter
.br

.br
This filter converts AVC|H264 and HEVC streams into AnnexB format, with inband parameter sets and start codes.
.br

.br
.SH Options (expert):
.LP
.br
rcfg (bool, default: true):    force repeating decoder config at each I-frame
.br
extract (enum, default: all):  layer extraction mode
.br
* all: extracts all layers
.br
* base: extract base layer only
.br
* layer: extract non-base layer(s) only
.br

.br
delim (bool, default: true):   insert AU Delimiter NAL
.br
pps_inband (bool, default: false): inject PPS at each non SAP frame, ignored if rcfg is not set
.br

.br
.SH writeqcp
.LP
.br
Description: QCP writer
.br

.br
This filter converts a single QCELP, EVRC or MSV stream to a QCP output file.
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br

.br
.SH ufvtt
.LP
.br
Description: WebVTT rewriter
.br

.br
This filter converts a single ISOBMFF WebVTT stream to its unframed format.
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br
merge_cues (bool, default: true): merge VTT cues (undo ISOBMFF cue split)
.br
noempty (bool, default: false): do not create an empty file if no VTT cues are present
.br

.br
.SH nhntw
.LP
.br
Description: NHNT writer
.br

.br
This filter converts a single stream to an NHNT output file.
.br
NHNT documentation is available at https://wiki.gpac.io/xmlformats/NHNT-Format
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br
large (bool, default: false):  use large file mode
.br

.br
.SH nhmlw
.LP
.br
Description: NHML writer
.br

.br
This filter converts a single stream to an NHML output file.
.br
NHML documentation is available at https://wiki.gpac.io/xmlformats/NHML-Format
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br
dims (bool, default: false):   use DIMS mode
.br
name (str):                    set output name of media and info files produced
.br
nhmlonly (bool, default: false): only dump NHML info, not media
.br
pckp (bool, default: false):   full NHML dump
.br
payload (bool, default: false): dump payload (scte35 only at the moment), should be combined with ǹhmlonly
.br
chksum (enum, default: none):  insert frame checksum
.br
* none: no checksum
.br
* crc: CRC32 checksum
.br
* sha1: SHA1 checksum
.br

.br

.br
.SH vobsubdmx
.LP
.br
Description: VobSub demultiplexer
.br

.br
This filter parses VobSub files/data to produce media PIDs and frames.
.br

.br
.SH Options (expert):
.LP
.br
blankframe (bool, default: true): force inserting a blank frame if first subpic is not at 0
.br
keepempty (bool, default: false): declare VobSub tracks with no frames
.br

.br
.SH avimx
.LP
.br
Description: AVI multiplexer
.br

.br
This filter multiplexes raw or compressed audio and video to produce an AVI output.
.br

.br
Unlike other multiplexing filters in GPAC, this filter is a sink filter and does not produce any PID to be redirected in the graph.
.br
The filter can however use template names for its output, using the first input PID to resolve the final name.
.br
The filter watches the property FileNumber on incoming packets to create new files.
.br

.br
The filter will look for property AVIType set on the input stream.
.br
The value can either be a 4CC or a string, indicating the mux format for the PID.
.br
If the string is prefixed with + and the decoder configuration is present and formatted as an ISOBMFF box, the box header will be removed.
.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    location of destination file
.br
fps (frac, default: 25/1):     default framerate if none indicated in stream
.br
noraw (bool, default: false):  disable raw output in AVI, only compressed ones allowed
.br
opendml_size (luint, default: 0): force opendml format when chunks are larger than this amount (0 means 1.9Gb max size in each riff chunk)
.br

.br
.SH aout
.LP
.br
Description: Audio output
.br

.br
This filter writes a single PCM (uncompressed) audio input PID to a sound card or other audio output device.
.br

.br
The longer the audio buffering .I bdur is, the longer the audio latency will be (pause/resume). The quality of fast forward audio playback will also be degraded when using large audio buffers.
.br

.br
If .I clock is set, the filter will report system time (in us) and corresponding packet CTS for other filters to use for AV sync.
.br

.br
.SH Options (expert):
.LP
.br
drv (cstr):                    audio driver name
.br
bnum (uint, default: 2):       number of audio buffers (0 for auto)
.br
bdur (uint, default: 100):     total duration of all buffers in ms (0 for auto)
.br
threaded (bool, default: true): force dedicated thread creation if sound card driver is not threaded
.br
dur (frac, default: 0):        only play the specified duration
.br
clock (bool, default: true):   hint audio clock for this stream
.br
speed (dbl, default: 1.0, updatable): set playback speed. If speed is negative and start is 0, start is set to -1
.br
start (dbl, default: 0.0, updatable): set playback start offset. A negative value means percent of media duration with -1 equal to duration
.br
vol (uint, default: 100, minmax: 0-100, updatable): set default audio volume, as a percentage between 0 and 100
.br
pan (uint, default: 50, minmax: 0-100, updatable): set stereo pan, as a percentage between 0 and 100, 50 being centered
.br
buffer (uint, default: 200):   set playout buffer in ms
.br
mbuffer (uint, default: 0):    set max buffer occupancy in ms. If less than buffer, use buffer
.br
rbuffer (uint, default: 0, updatable): rebuffer trigger in ms. If 0 or more than buffer, disable rebuffering
.br
adelay (frac, default: 0, updatable): set audio delay in sec
.br
buffer_done (bool):            buffer done indication (readonly, for user app)
.br
rebuffer (luint):              system time in us at which last rebuffer started, 0 if not rebuffering (readonly, for user app)
.br
media_offset (dbl, default: 0): media offset (substract this value to CTS to get media time - readonly)
.br

.br
.SH ufm4v
.LP
.br
Description: M4V rewriter
.br

.br
This filter converts MPEG-4 part 2 visual streams into writable format (reinsert decoder config).
.br

.br
.SH Options (expert):
.LP
.br
rcfg (bool, default: true):    force repeating decoder config at each I-frame
.br

.br
.SH ufvc1
.LP
.br
Description: VC1 rewriter
.br

.br
This filter converts VC1 visual streams into writable format (reinsert decoder config and start codes if needed).
.br

.br
.SH Options (expert):
.LP
.br
rcfg (bool, default: true):    force repeating decoder config at each I-frame
.br

.br
.SH resample
.LP
.br
Description: Audio resampler
.br

.br
This filter resamples raw audio to a target sample rate, number of channels or audio format.
.br

.br
.SH Options (expert):
.LP
.br
och (uint, default: 0):        desired number of output audio channels (0 for auto)
.br
osr (uint, default: 0):        desired sample rate of output audio (0 for auto)
.br
osfmt (afmt, default: none):   desired sample format of output audio (none for auto)
.br
olayout (alay, Enum: mono|stereo|3/0.0|3/1.0|3/2.0|3/2.1|5/2.1|1+1|2/1.0|2/2.0|3/3.1|3/4.1|11/11.2|5/2.1|5/5.2|5/4.1|6/5.1|6/7.1|5/6.1|7/6.1): desired CICP layout of output audio (null for auto)
.br

.br

.br
.SH vout
.LP
.br
Description: Video output
.br

.br
This filter displays a single visual input PID in a window.
.br
The window is created unless a window handle (HWND, xWindow, etc) is indicated in the config file ( [Temp]OSWnd=ptr).
.br
The output uses GPAC video output module indicated in .I drv option or in the config file (see GPAC core help).
.br
The video output module can be further configured (see GPAC core help).
.br
The filter can use OpenGL or 2D blit of the graphics card, depending on the OS support.
.br
The filter can be used do dump frames as written by the graphics card (GPU read-back) using .I dumpframes.
.br
In this case, the window is not visible and only the listed frames are drawn to the GPU.
.br
The pixel format of the dumped frame is always RGB in OpenGL and matches the video backbuffer format in 2D mode.
.br

.br
.SH Options (expert):
.LP
.br
drv (cstr):                    video driver name
.br
vsync (bool, default: true):   enable video screen sync
.br
drop (bool, default: false, updatable): enable dropping late frames
.br
disp (enum, default: gl):      display mode
.br
* gl: OpenGL
.br
* pbo: OpenGL with PBO
.br
* blit: 2D hardware blit
.br
* soft: software blit
.br

.br
start (dbl, default: 0.0, updatable): set playback start offset. A negative value means percent of media duration with -1 equal to duration
.br
dur (lfrac, default: 0):       only play the specified duration
.br
speed (dbl, default: 1.0, updatable): set playback speed when vsync is on. If speed is negative and start is 0, start is set to -1
.br
hold (dbl, default: 1.0):      number of seconds to hold display for single-frame streams (a negative value force a hold on last frame for single or multi-frames streams)
.br
linear (bool, default: false): use linear filtering instead of nearest pixel for GL mode
.br
back (uint, default: 0x808080): back color for transparent images
.br
wsize (v2di, default: -1x-1):  default init window size
.br
- 0x0 holds the window size of the first frame
.br
- negative values indicate video media size
.br

.br
wpos (v2di, default: -1x-1):   default position (0,0 top-left)
.br
vdelay (frac, default: 0, updatable): set delay in sec, positive value displays after audio clock
.br
hide (bool, default: false):   hide output window
.br
fullscreen (bool, default: false, updatable): use fullscreen
.br
buffer (uint, default: 100):   set playout buffer in ms
.br
mbuffer (uint, default: 0):    set max buffer occupancy in ms. If less than buffer, use buffer
.br
rbuffer (uint, default: 0, updatable): rebuffer trigger in ms. If 0 or more than buffer, disable rebuffering
.br
dumpframes (uintl):            ordered list of frames to dump, 1 being first frame. Special value 0 means dump all frames
.br
out (str, default: dump):      radical of dump frame filenames. If no extension provided, frames are exported as $OUT_%d.PFMT
.br
async (bool, default: true):   sync video to audio output if any
.br
owsize (v2di):                 output window size (readonly)
.br
buffer_done (bool):            buffer done indication (readonly)
.br
rebuffer (luint):              system time in us at which last rebuffer started, 0 if not rebuffering (readonly)
.br
vjs (bool, default: true):     use default JS script for vout control
.br
media_offset (dbl, default: 0): media offset (substract this value to CTS to get media time - readonly)
.br
wid (uint, default: 0):        window id (readonly)
.br
vflip (enum, default: no, updatable): flip video (GL only)
.br
* no: no flipping
.br
* v: vertical flip
.br
* h: horizontal flip
.br
* vh: horizontal and vertical
.br
* hv: same as vh
.br

.br
vrot (enum, default: 0, updatable): rotate video by given angle
.br
* 0: no rotation
.br
* 90: rotate 90 degree counter clockwise
.br
* 180: rotate 180 degree
.br
* 270: rotate 90 degree clockwise
.br

.br

.br
.SH vcrop
.LP
.br
Description: Video cropper
.br

.br
This filter is used to crop raw video data.
.br

.br
.SH Options (expert):
.LP
.br
wnd (str):                     size of output to crop, indicated as TxLxWxH. If % is indicated after a number, the value is in percent of the source width (for L and W) or height (for T and H). An absolute offset (+x, -x) can be added after percent
.br
copy (bool, default: false):   copy the source pixels. By default the filter will try to forward crop frames by adjusting offsets and strides of the source if possible (window contained in frame)
.br
round (enum, default: up):     adjust dimension to be a multiple of 2
.br
* up: up rounding
.br
* down: down rounding
.br
* allup: up rounding on formats that do not require it (RGB, YUV444)
.br
* alldown: down rounding on formats that do not require it (RGB, YUV444)
.br

.br

.br
.SH vflip
.LP
.br
Description: Video flipper
.br

.br
This filter flips uncompressed video frames vertically, horizontally, in both directions or no flip
.br

.br
.SH Options (expert):
.LP
.br
mode (enum, default: vert, updatable): flip mode
.br
* off: no flipping (passthrough)
.br
* vert: vertical flip
.br
* horiz: horizontal flip
.br
* both: horizontal and vertical flip
.br

.br

.br
.SH rfrawvid
.LP
.br
Description: RAW video reframer
.br

.br
This filter parses raw YUV and RGB files/data and outputs corresponding raw video PID and frames.
.br

.br
The filter also parses YUV4MPEG format.
.br

.br
.SH Options (expert):
.LP
.br
size (v2di, default: 0x0):     source video resolution
.br
spfmt (pfmt, default: none, Enum: none|yuv420|yvu420|yuv420_10|yuv422|yuv422_10|yuv444|yuv444_10|uyvy|vyuy|yuyv|yvyu|uyvl|vyul|yuyl|yvyl|nv12|nv21|nv1l|nv2l|yuva|yuvd|yuv444a|yuv444p|v308|yuv444ap|v408|v410|v210|grey|algr|gral|rgb4|rgb5|rgb6|rgba|argb|bgra|abgr|rgb|bgr|xrgb|rgbx|xbgr|bgrx|rgbd|rgbds|uncv): source pixel format. When not set, derived from file extension
.br

.br
fps (frac, default: 25/1):     number of frames per second
.br
copy (bool, default: false):   copy source bytes into output frame. If not set, source bytes are referenced only
.br

.br
.SH rfpcm
.LP
.br
Description: PCM reframer
.br

.br
This filter parses raw PCM file/data or WAVE files and outputs corresponding raw audio PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
sr (uint, default: 44100):     sample rate
.br
safmt (afmt, default: none, Enum: none|u8|s16|s16b|s24|s24b|s32|s32b|flt|fltb|dbl|dblb|u8p|s16p|s24p|s32p|fltp|dblp): audio format
.br

.br
ch (uint, default: 2):         number of channels
.br
framelen (uint, default: 1024): number of samples to put in one audio frame. For planar formats, indicate plane size in samples
.br

.br
.SH jpgenc
.LP
.br
Description: JPG encoder
.br

.br
This filter encodes a single uncompressed video PID to JPEG using libjpeg.
.br

.br
.SH Options (expert):
.LP
.br
dctmode (enum, default: fast): type of DCT used
.br
* slow: precise but slow integer DCT
.br
* fast: less precise but faster integer DCT
.br
* float: float DCT
.br

.br
quality (uint, default: 100, minmax: 0-100, updatable): compression quality
.br

.br
.SH pngenc
.LP
.br
Description: PNG encoder
.br

.br
This filter encodes a single uncompressed video PID to PNG using libpng.
.br

.br
No options
.br

.br
.SH rewind
.LP
.br
Description: Audio/Video rewinder
.br

.br
This filter reverses audio and video frames in negative playback speed.
.br
The filter is in passthrough if speed is positive. Otherwise, it reverts decoded GOPs for video, or revert samples in decoded frame for audio (not really nice for most codecs).
.br

.br
.SH Options (expert):
.LP
.br
rbuffer (uint, default: 100):  size of video rewind buffer in frames. If more frames than this, flush is performed
.br

.br
.SH flist
.LP
.br
Description: Sources concatenator
.br

.br
This filter can be used to play playlist files or a list of sources.
.br

.br
The filter loads any source supported by GPAC: remote or local files or streaming sessions (TS, RTP, DASH or other).
.br
The filter demultiplexes inputs and recomputes input timestamps into a continuous timeline.
.br
At each new source, the filter tries to remap input PIDs to already declared output PIDs of the same type, if any, or declares new output PIDs otherwise. If no input PID matches the type of an output, no packets are send for that PID.
.br

.br
.SH Source list mode
.LP
.br
The source list mode is activated by using flist:srcs=f1[,f2], where f1 can be a file or a directory to enumerate.
.br
The syntax for directory enumeration is:
.br
* dir, dir/ or dir/*: enumerates everything in directory dir
.br
* foo/*.png: enumerates all files with extension png in directory foo
.br
* foo/*.png;*.jpg: enumerates all files with extension png or jpg in directory foo
.br

.br
The resulting file list can be sorted using .I fsort.
.br
If the sort mode is datex and source files are images or single frame files, the following applies:
.br
- options .I floop, .I revert and .I fdur are ignored
.br
- the files are sorted by modification time
.br
- the first frame is assigned a timestamp of 0
.br
- each frame (coming from each file) is assigned a duration equal to the difference of modification time between the file and the next file
.br
- the last frame is assigned the same duration as the previous one
.br

.br
When sorting by names:
.br
- shorter filenames are inserted before longer filenames
.br
- alphabetical sorting is used if same filename length
.br

.br
.SH Playlist mode
.LP
.br
The playlist mode is activated when opening a playlist file (m3u format, utf-8 encoding, no BOM, default extensions m3u, txt or pl).
.br
In this mode, directives can be given in a comment line, i.e. a line starting with # before the line with the file name.
.br
Lines stating with ## are ignored.
.br

.br
The playlist file is refreshed whenever the next source has to be reloaded in order to allow for dynamic pushing of sources in the playlist.
.br
If the last URL played cannot be found in the playlist, the first URL in the playlist file will be loaded.
.br

.br
When .I ka is used to keep refreshing the playlist on regular basis, the playlist must end with a new line.
.br
Playlist refreshing will abort:
.br
- if the input playlist has a line not ending with a LF (\n) character, in order to avoid asynchronous issues when reading the playlist.
.br
- if the input playlist has not been modified for the .I timeout option value (infinite by default).
.br
.SS Playlist directives
.br
A playlist directive line can contain zero or more directives, separated with space. The following directives are supported:
.br
* repeat=N: repeats N times the content (hence played N+1).
.br
* start=T: tries to play the file from start time T seconds (double format only). This may not work with some files/formats not supporting seeking.
.br
* stop=T: stops source playback after T seconds (double format only). This works on any source (implemented independently from seek support).
.br
* cat: specifies that the following entry should be concatenated to the previous source rather than opening a new source. This can optionally specify a byte range if desired, otherwise the full file is concatenated.
.br
Note: When sources are ISOBMFF files or segments on local storage or GF_FileIO objects, the concatenation will be automatically detected.
.br
* srange=T: when cat is set, indicates the start T (64 bit decimal, default 0) of the byte range from the next entry to concatenate.
.br
* send=T: when cat is set, indicates the end T (64 bit decimal, default 0) of the byte range from the next entry to concatenate.
.br
* props=STR: assigns properties described in STR to all PIDs coming from the listed sources on next line. STR is formatted according to gpac -h doc using the default parameter set.
.br
* del: specifies that the source file(s) must be deleted once processed, true by default if .I fdel is set.
.br
* out=V: specifies splicing start time (cf below).
.br
* in=V: specifies splicing end time (cf below).
.br
* nosync: prevents timestamp adjustments when joining sources (implied if cat is set).
.br
* keep: keeps spliced period in output (cf below).
.br
* mark: only inject marker for the splice period and do not load any replacement content (cf below).
.br
* sprops=STR: assigns properties described in STR to all PIDs of the main content during a splice (cf below). STR is formatted according to gpac -h doc using the default parameter set.
.br
* chap=NAME: assigns chapter name at the start of next URL (filter always removes source chapter names).
.br

.br
The following global options (applying to the filter, not the sources) may also be set in the playlist:
.br
* ka=N: force .I ka option to N millisecond refresh.
.br
* floop=N: set .I floop option from within playlist.
.br
* raw: set .I raw option from within playlist.
.br

.br
The default behavior when joining sources is to realign the timeline origin of the new source to the maximum time in all PIDs of the previous sources.
.br
This may create gaps in the timeline in case previous source PIDs are not of equal duration (quite common with most audio codecs).
.br
Using nosync directive will disable this realignment and provide a continuous timeline but may introduce synchronization errors depending in the source encoding (use with caution).
.br
.SS Source syntax
.br
The source lines follow the usual source syntax, see gpac -h.
.br
Additional PID properties can be added per source (see gpac -h doc), but are valid only for the current source, and reset at next source.
.br
The loaded sources do not inherit arguments from the parent playlist filter.
.br

.br
The URL given can either be a single URL, or a list of URLs separated by " && " to load several sources for the active entry.
.br
Warning: There shall not be any other space/tab characters between sources.
.br
Example
.br
audio.mp4 && video.mp4
.br

.br
.SS Source with filter chains
.br
Each URL can be followed by a chain of one or more filters, using the @ link directive as used in gpac (see gpac -h doc).
.br
A negative link index (e.g. @-1) can be used to setup a new filter chain starting from the last specified source in the line.
.br
Warning: There shall be a single character, with value space (' '), before and after each link directive.
.br

.br
Example
.br
src.mp4 @ reframer:rt=on
.br

.br
This will inject a reframer with real-time regulation between source and flist filter.
.br
Example
.br
src.mp4 @ reframer:saps=1 @1 reframer:saps=0,2,3
.br
src.mp4 @ reframer:saps=1 @-1 reframer:saps=0,2,3
.br

.br
This will inject a reframer filtering only SAP1 frames and a reframer filtering only non-SAP1 frames between source and flist filter
.br

.br
Link options can be specified (see gpac -h doc).
.br
Example
.br
src.mp4 @#video reframer:rt=on
.br

.br
This will inject a reframer with real-time regulation between video PID of source and flist filter.
.br

.br
When using filter chains, the flist filter will only accept PIDs from the last declared filter in the chain.
.br
In order to accept other PIDs from the source, you must specify a final link directive with no following filter.
.br
Example
.br
src.mp4 @#video reframer:rt=on @-1#audio
.br

.br
This will inject a reframer with real-time regulation between video PID of source and flist filter, and will also allow audio PIDs from source to connect to flist filter.
.br

.br
The empty link directive can also be used on the last declared filter
.br
Example
.br
src.mp4 @ reframer:rt=on @#audio
.br

.br
This will inject a reframer with real-time regulation between source and flist filter and only connect audio PIDs to flist filter.
.br
.SS Splicing
.br
The playlist can be used to splice content with other content following a media in the playlist.
.br
A source item is declared as main media in a splice operation if and only if it has an out directive set (possibly empty).
.br
Directive can be used for the main media except concatenation directives.
.br

.br
The splicing operations do not alter media frames and do not perform uncompressed domain operations such as cross-fade or mixing.
.br

.br
The out (resp. in) directive specifies the media splice start (resp. end) time. The value can be formatted as follows:
.br
* empty: the time is not yet assigned
.br
* `now`: the time is resolved to the next SAP point in the media
.br
* integer, float or fraction: set time in seconds
.br
* `+VAL`: used for in only, specify the end point as delta in seconds from the start point (VAL can be integer, float or fraction)
.br
* DATE: set splice time according to wall clock DATE, formatted as an XSD dateTime
.br
The splice times (except wall clock) are expressed in the source (main media) timing, not the reconstructed output timeline.
.br

.br
When a splice begins (out time reached), the source items following the main media are played until the end of the splice or the end of the main media.
.br
Sources used during the splice period can use directives such as start, dur or repeat.
.br

.br
Once a splice is done (in time reached), the main media out splice time is reset to undefined.
.br

.br
When the main media has undefined out or in splice times, the playlist is reloaded at each new main media packet to check for resolved values.
.br
- out can only be modified when no splice is active, otherwise it is ignored. If modified, it resets the next source to play to be the one following the modified main media.
.br
- in can only be modified when a splice is active with an undefined end time, otherwise it is ignored.
.br

.br
When the main media is over:
.br
- if repeat directive is set, the main media is repeated, in and out set to their initial values and the next splicing content is the one following the main content,
.br
- otherwise, the next source queued is the one following the last source played during the last splice period.
.br

.br
It is allowed to defined several main media in the playlist, but a main media is not allowed as media for a splice period.
.br

.br
The filter will look for the property Period on the output PIDs of the main media for multi-period DASH.
.br
If found, _N is appended to the period ID, with N starting from 1 and increased at each main media resume.
.br
If no Period property is set on main or spliced media, period switch can still be forced using .I -pswitch DASH option.
.br

.br
If mark directive is set for a main media, no content replacement is done and the splice boundaries will be signaled in the main media.
.br
If keep directive is set for a main media, the main media is forwarded along with the replacement content.
.br
When mark or keep directives are set, it is possible to alter the PID properties of the main media using sprops directive.
.br

.br
Example
.br
#out=2 in=4 mark sprops=#xlink=http://foo.bar/
.br
src:#Period=main
.br

.br
This will inject property xlink on the output PIDs in the splice zone (corresponding to period main_2) but not in the rest of the main media.
.br

.br
Directives mark, keep and sprops are reset at the end of the splice period.
.br

.br
.SH Options (expert):
.LP
.br
floop (sint, default: 0):      loop playlist/list of files, 0 for one time, n for n+1 times, -1 for indefinitely
.br
srcs (strl):                   list of files to play
.br
fdur (frac, default: 1/25):    frame duration for source files with a single frame (0/NaN fraction means reuse source timing which is usually not set!)
.br
revert (bool, default: false): revert list of files (.I srcs, not playlist)
.br
timescale (uint, default: 0):  force output timescale on all PIDs (0 uses the timescale of the first PID found)
.br
ka (uint, default: 0):         keep playlist alive (disable loop), waiting for a new input to be added or #end directive to end playlist. The value specifies the refresh rate in ms
.br
timeout (luint, default: -1):  timeout in ms after which the playlist is considered dead (-1 means indefinitely)
.br
fsort (enum, default: no):     sort list of files
.br
* no: no sorting, use default directory enumeration of OS
.br
* name: sort by alphabetical name
.br
* size: sort by increasing size
.br
* date: sort by increasing modification time
.br
* datex: sort by increasing modification time
.br

.br
sigcues (bool, default: false): inject CueStart property at each source begin (new or repeated) for DASHing
.br
fdel (bool, default: false):   delete source files after processing in playlist mode (does not delete the playlist)
.br
keepts (bool, default: false): keep initial timestamps unmodified (no reset to 0)
.br
raw (enum, default: no):       force input AV streams to be in raw format
.br
* no: do not force decoding of inputs
.br
* av: force decoding of audio and video inputs
.br
* a: force decoding of audio inputs
.br
* v: force decoding of video inputs
.br

.br
flush (bool, default: false):  send a flush signal once playlist is done before entering keepalive
.br

.br
.SH m2tsmx
.LP
.br
Description: MPEG-2 TS multiplexer
.br

.br
This filter multiplexes one or more input PIDs into a MPEG-2 Transport Stream multiplex.
.br

.br
.SH PID selection
.LP
.br
The MPEG-2 TS multiplexer assigns M2TS PID for media streams using the PID of the PMT plus the stream index.
.br
For example, the default config creates the first program with a PMT PID 100, the first stream will have a PID of 101.
.br
Streams are grouped in programs based on input PID property ServiceID if present. If absent, stream will go in the program with service ID as indicated by .I sid option.
.br
- .I name option is overridden by input PID property ServiceName.
.br
- .I provider option is overridden by input PID property ServiceProvider.
.br
- .I pcr_offset option is overridden by input PID property "tsmux:pcr_offset"
.br
- .I first_pts option is overridden by input PID property "tsmux:force_pts"
.br
- .I temi option is overridden by input PID property "tsmux:temi"
.br

.br
.SH Time and External Media Information (TEMI)
.LP
.br
The .I temi option allows specifying a list of URLs or timeline IDs to insert in streams of a program.
.br
One or more TEMI timeline can be specified per PID.
.br
The syntax is a comma-separated list of one or more TEMI description.
.br
Each TEMI description is formatted as ID_OR_URL or #OPT1[#OPT2]#ID_OR_URL. Options are:
.br
* S`N`: indicate the target service with ID N
.br
* T`N`: set timescale to use (default: PID timescale)
.br
* D`N`: set delay in ms between two TEMI url descriptors (default 1000)
.br
* O`N`: set offset (max 64 bits) to add to TEMI timecodes (default 0). If timescale is not specified, offset value is in ms, otherwise in timescale units.
.br
* I`N`: set initial value (max 64 bits) of TEMI timecodes. If not set, initial value will match first packet CTS. If timescale is not specified, value is in PID timescale units, otherwise in specified timescale units.
.br
* P`N`: indicate target PID in program. Possible values are
.br
  * `V`: only insert for video streams.
.br
  * `A`: only insert for audio streams.
.br
  * `T`: only insert for text streams.
.br
  * N: only insert for stream with index N (0-based) in the program.
.br
* L`C`: set 64bit timecode signaling. Possible values for C are:
.br
  * `A`: automatic switch between 32 and 64 bit depending on timecode value (default if not specified).
.br
  * `Y`: use 64 bit signaling only.
.br
  * `N`: use 32 bit signaling only and wrap around timecode value.
.br
* N: insert NTP timestamp in TEMI timeline descriptor
.br
* n: insert NTP timestamp using NTP for first packet than incrementing based on media timestamp (for non real-time)
.br
* ID_OR_URL: If number, indicate the TEMI ID to use for external timeline. Otherwise, give the URL to insert
.br
  
.br
Example
.br
temi="url"
.br

.br
Inserts a TEMI URL+timecode in the each stream of each program.
.br
Example
.br
temi="#P0#url,#P1#4"
.br

.br
Inserts a TEMI URL+timecode in the first stream of all programs and an external TEMI with ID 4 in the second stream of all programs.
.br
Example
.br
temi="#P0#2,#P0#url,#P1#4"
.br

.br
Inserts a TEMI with ID 2 and a TEMI URL+timecode in the first stream of all programs, and an external TEMI with ID 4 in the second stream of all programs.
.br
Example
.br
temi="#S20#4,#S10#URL"
.br

.br
Inserts an external TEMI with ID 4 in the each stream of program with ServiceID 20 and a TEMI URL in each stream of program with ServiceID 10.
.br
Example
.br
temi="#N#D500#PV#T30000#4"
.br

.br
Inserts an external TEMI with ID 4 and timescale 30000, NTP injection and carousel of 500 ms in the video stream of all programs.
.br

.br
Warning: multipliers (k,m,g) are not supported in TEMI options.
.br

.br
When input TEMI properties are found, they can be removed using .I temi_fwd. When rewritten, any NTP information present is rewritten to the current NTP.
.br
.SH Adaptive Streaming
.LP
.br
In DASH and HLS mode:
.br
- the PCR is always initialized at 0, and .I flush_rap is automatically set.
.br
- unless nb_pack is specified, 200 TS packets will be used as pack output in DASH mode.
.br
- pes_pack=none is forced since some demultiplexers have issues with non-aligned ADTS PES.
.br

.br
The filter watches the property FileNumber on incoming packets to create new files, or new segments in DASH mode.
.br
.SH Custom streams
.LP
.br
The filter will look for property M2TSRA set on the input stream.
.br
The value can either be a 4CC or a string, indicating the MP2G-2 TS Registration tag for unknown media types.
.br
The value SRT  (alias: srt, SRT) will inject an SRT header with frame number increasing at each packet and start time 0.
.br
Example
.br
gpac -i source.srt:#M2TSRA='SRT ' -o mux.ts
.br

.br
This will inject the content of the source SRT as a PES data stream, removing any markup.
.br
Example
.br
gpac -i source.srt:stxtmod=sbtt:#M2TSRA='SRT ' -o mux.ts
.br

.br
This will inject the content of the source SRT as a PES data stream, keeping the markup.
.br

.br
.SH Notes
.LP
.br
In LATM mux mode, the decoder configuration is inserted at the given .I repeat_rate or CarouselRate PID property if defined.
.br

.br
By default text streams are embeded using HLS ID3 schemes, use M2TSRA property to use raw private PES.
.br
WebVTT header and TX3G formatting are removed, only the text data is injected.
.br

.br
.SH Options (expert):
.LP
.br
breq (uint, default: 100):     buffer requirements in ms for input PIDs
.br
pmt_id (uint, default: 100):   define the ID of the first PMT to use in the mux
.br
rate (uint, default: 0):       target rate in bps of the multiplex. If not set, variable rate is used
.br
pmt_rate (uint, default: 200): interval between PMT in ms
.br
pat_rate (uint, default: 200): interval between PAT in ms
.br
first_pts (luint, default: 0): force PTS value of first packet, in 90kHz
.br
pcr_offset (luint, default: -1): offset all timestamps from PCR by V, in 90kHz (default value is computed based on input media)
.br
mpeg4 (enum, default: none):   force usage of MPEG-4 signaling (IOD and SL Config)
.br
* none: disables 4on2
.br
* full: sends AUs as SL packets over section for OD, section/pes for scene (cf bifs_pes)
.br
* scene: sends only scene streams as 4on2 but uses regular PES without SL for audio and video
.br

.br
pmt_version (uint, default: 200): set version number of the PMT
.br
disc (bool, default: false):   set the discontinuity marker for the first packet of each stream
.br
repeat_rate (uint, default: 0): interval in ms between two carousel send for MPEG-4 systems (overridden by CarouselRate PID property if defined)
.br
repeat_img (uint, default: 0): interval in ms between re-sending (as PES) of single-image streams (if 0, image data is sent once only)
.br
max_pcr (uint, default: 100):  set max interval in ms between 2 PCR
.br
nb_pack (uint, default: 4):    pack N TS packets in output packets
.br
pes_pack (enum, default: audio): set AU to PES packing mode
.br
* audio: will pack only multiple audio AUs in a PES
.br
* none: make exactly one AU per PES
.br
* all: will pack multiple AUs per PES for all streams
.br

.br
realtime (bool, default: false): use real-time output
.br
bifs_pes (enum, default: off): select BIFS streams packetization (PES vs sections)
.br
* on: uses BIFS PES
.br
* off: uses BIFS sections
.br
* copy: uses BIFS PES but removes timestamps in BIFS SL and only carries PES timestamps
.br

.br
flush_rap (bool, default: false): force flushing mux program when RAP is found on video, and injects PAT and PMT before the next video PES begin
.br
pcr_only (bool, default: false): enable PCR-only TS packets
.br
pcr_init (lsint, default: -1): set initial PCR value for the programs. -1 means random value is picked, other negative value means offset to maximum PCR
.br
sid (uint, default: 0):        set service ID for the program
.br
name (str):                    set service name for the program
.br
provider (str):                set service provider name for the program
.br
sdt_rate (uint, default: 0):   interval in ms between two DVB SDT tables (if 0, SDT is disabled)
.br
temi (str):                    insert TEMI time codes in adaptation field
.br
log_freq (uint, default: 500): delay between logs for realtime mux
.br
latm (bool, default: false):   use LATM AAC encapsulation instead of regular ADTS
.br
subs_sidx (sint, default: -1): number of subsegments per sidx (negative value disables sidx)
.br
keepts (bool, default: false): keep cts/dts untouched and adjust PCR accordingly, used to keep TS unmodified when dashing
.br
temi_fwd (enum, default: fwd): input TEMI properties when remuwing
.br
* drop: remove input descriptors
.br
* fwd: forward input descriptors
.br
* ntp: forward input descriptors after NTP rewriting
.br

.br

.br
.SH dasher
.LP
.br
Description: DASH & HLS segmenter
.br

.br
This filter provides segmentation and manifest generation for MPEG-DASH and HLS formats.
.br
The segmenter currently supports:
.br
- MPD and m3u8 generation (potentially in parallel)
.br
- ISOBMFF, MPEG-2 TS, MKV and raw bitstream segment formats
.br
- override of profiles and levels in manifest for codecs
.br
- most MPEG-DASH profiles
.br
- static and dynamic (live) manifest offering
.br
- context store and reload for batch processing of live/dynamic sessions
.br

.br
The filter does perform per-segment real-time regulation using .I sreg.
.br
If you need per-frame real-time regulation on non-real-time inputs, insert a reframer before to perform real-time regulation.
.br
Example
.br
gpac -i file.mp4 reframer:rt=on -o live.mpd:dmode=dynamic
.br

.br
.SS Template strings
.br
The segmenter uses templates to derive output file names and folder, regardless of the DASH mode (even when templates are not used). The default one is $File$_dash for ondemand and single file modes, and $File$_$Number$ for separate segment files
.br
Example
.br
template=Great_$File$_$Width$_$Number$
.br

.br
If input is foo.mp4 with 640x360 video resolution, this will resolve in Great_foo_640_$Number$ for the DASH template.
.br
Example
.br
template=Great_$File$_$Width$
.br

.br
If input is foo.mp4 with 640x360 video resolution, this will resolve in Great_foo_640.mp4 for onDemand case.
.br

.br
Standard DASH replacement strings: 
.br
* $Number[%%0Nd]$: replaced by the segment number, possibly prefixed with 0
.br
* $RepresentationID$: replaced by representation name
.br
* $Time$: replaced by segment start time
.br
* $Bandwidth$: replaced by representation bandwidth.
.br
* $SubNumber[%%0Nd]$: replaced by the segment number in the segment sequence, possibly prefixed with 0
.br
Note: these strings are not replaced in the manifest templates elements.
.br

.br
Additional replacement strings (not DASH, not generic GPAC replacements but may occur multiple times in template):
.br
* $Init=NAME$: replaced by NAME for init segment, ignored otherwise
.br
* $XInit=NAME$: complete replace by NAME for init segment, ignored otherwise
.br
* $InitExt=EXT$: replaced by EXT for init segment file extensions, ignored otherwise
.br
* $Index=NAME$: replaced by NAME for index segments, ignored otherwise
.br
* $Path=PATH$: replaced by PATH when creating segments, ignored otherwise
.br
* $Segment=NAME$: replaced by NAME for media segments, ignored for init segments
.br
* $SegExt=EXT$: replaced by EXT for media segment file extensions, ignored for init segments
.br
* $FS$ (FileSuffix): replaced by _trackN in case the input is an AV multiplex, or kept empty otherwise
.br
Note: these strings are replaced in the manifest templates elements.
.br

.br
Other properties can also be set, see below.
.br

.br
.SS PID assignment and configuration
.br
To assign PIDs into periods and adaptation sets and configure the session, the segmenter looks for the following properties on each input PID:
.br
* `Representation`: assigns representation ID to input PID. If not set, the default behavior is to have each media component in different adaptation sets. Setting the Representation allows explicit multiplexing of the source(s)
.br
* `Period`: assigns period ID to input PID. If not set, the default behavior is to have all media in the same period with the same start time
.br
* `PStart`: assigns period start. If not set, 0 is assumed, and periods appear in the Period ID declaration order. If negative, this gives the period order (-1 first, then -2 ...). If positive, this gives the true start time and will abort DASHing at period end
.br
Note: When both positive and negative values are found, the by-order periods (negative) will be inserted AFTER the timed period (positive)
.br
* `ASID`: assigns parent adaptation set ID. If not 0, only sources with same AS ID will be in the same adaptation set
.br
Note: If multiple streams in source, only the first stream will have an AS ID assigned
.br
* `xlink`: for remote periods, only checked for null PID
.br
* `Role`, `PDesc`, `ASDesc`, `ASCDesc`, `RDesc`: various descriptors to set for period, AS or representation
.br
* `BUrl`: overrides segmenter [-base] with a set of BaseURLs to use for the PID (per representation)
.br
* `Template`: overrides segmenter .I template for this PID
.br
* `DashDur`: overrides segmenter segment duration for this PID
.br
* `StartNumber`: sets the start number for the first segment in the PID, default is 1
.br
* `IntraOnly`: indicates input PID follows HLS EXT-X-I-FRAMES-ONLY guidelines
.br
* `CropOrigin`: indicates x and y coordinates of video for SRD (size is video size)
.br
* `SRD`: indicates SRD position and size of video for SRD, ignored if CropOrigin is set
.br
* `SRDRef`: indicates global width and height of SRD, ignored if CropOrigin is set
.br
* `HLSPL`: name of variant playlist, can use templates
.br
* `HLSMExt`: list of extensions to add to master playlist entries, ['foo','bar=val'] added as ,foo,bar=val
.br
* `HLSVExt`: list of extensions to add to variant playlist, ['#foo','#bar=val'] added as #foo \n #bar=val
.br
* Non-dash properties: Bitrate, SAR, Language, Width, Height, SampleRate, NumChannels, Language, ID, DependencyID, FPS, Interlaced, Codec. These properties are used to setup each representation and can be overridden on input PIDs using the general PID property settings (cf global help).
.br
  
.br
Example
.br
gpac -i test.mp4:#Bitrate=1M -o test.mpd
.br

.br
This will force declaring a bitrate of 1M for the representation, regardless of actual input bitrate.
.br
Example
.br
gpac -i muxav.mp4 -o test.mpd
.br

.br
This will create un-multiplexed DASH segments.
.br
Example
.br
gpac -i muxav.mp4:#Representation=1 -o test.mpd
.br

.br
This will create multiplexed DASH segments.
.br
Example
.br
gpac -i m1.mp4 -i m2.mp4:#Period=Yep -o test.mpd
.br

.br
This will put src m1.mp4 in first period, m2.mp4 in second period.
.br
Example
.br
gpac -i m1.mp4:#BUrl=http://foo/bar -o test.mpd
.br

.br
This will assign a baseURL to src m1.mp4.
.br
Example
.br
gpac -i m1.mp4:#ASCDesc=<ElemName val="attval">text</ElemName> -o test.mpd
.br

.br
This will assign the specified XML descriptor to the adaptation set.
.br
Note:  this can be used to inject most DASH descriptors not natively handled by the segmenter.
.br
The segmenter handles the XML descriptor as a string and does not attempt to validate it. Descriptors, as well as some segmenter filter arguments, are string lists (comma-separated by default), so that multiple descriptors can be added:
.br
.br
gpac -i m1.mp4:#RDesc=<Elem attribute="1"/>,<Elem2>text</Elem2> -o test.mpd
.br

.br
This will insert two descriptors in the representation(s) of m1.mp4.
.br
Example
.br
gpac -i video.mp4:#Template=foo$Number$ -i audio.mp4:#Template=bar$Number$ -o test.mpd
.br

.br
This will assign different templates to the audio and video sources.
.br
Example
.br
gpac -i null:#xlink=http://foo/bar.xml:#PDur=4 -i m.mp4:#PStart=-1 -o test.mpd
.br

.br
This will insert an create an MPD with first a remote period then a regular one.
.br
Example
.br
gpac -i null:#xlink=http://foo/bar.xml:#PStart=6 -i m.mp4 -o test.mpd
.br

.br
This will create an MPD with first a regular period, dashing only 6s of content, then a remote one.
.br
Example
.br
gpac -i v1:#SRD=0x0x1280x360:#SRDRef=1280x720 -i v2:#SRD=0x360x1280x360 -o test.mpd
.br

.br
This will layout the v2 below v1 using a global SRD size of 1280x720.
.br

.br
The segmenter will create multiplexing filter chains for each representation and will reassign PID IDs so that each media component (video, audio, ...) in an adaptation set has the same ID.
.br

.br
For HLS, the output manifest PID will deliver the master playlist and the variant playlists.
.br
The default variant playlist are $NAME_$N.m3u8, where $NAME is the radical of the output file name and $N is the 1-based index of the variant.
.br

.br
When HLS mode is enabled, the segment .I template is relative to the variant playlist file, which can also be templated.
.br
Example
.br
gpac -i av.mp4:#HLSPL=$Type$/index.m3u8 -o dash/live.m3u8:dual:template='$Number$'
.br

.br
This will put video segments and playlist in dash/video/ and audio segments and playlist in dash/audio/
.br

.br
.SS Segmentation
.br
The default behavior of the segmenter is to estimate the theoretical start time of each segment based on target segment duration, and start a new segment when a packet with SAP type 1,2,3 or 4 with time greater than the theoretical time is found.
.br
This behavior can be changed to find the best SAP packet around a segment theoretical boundary using .I sbound:
.br
* `closest` mode: the segment will start at the closest SAP of the theoretical boundary
.br
* `in` mode: the segment will start at or before the theoretical boundary
.br
Warning: These modes will introduce delay in the segmenter (typically buffering of one GOP) and should not be used for low-latency modes.
.br
The segmenter can also be configured to:
.br
- completely ignore SAP when segmenting using .I sap.
.br
- ignore SAP on non-video streams when segmenting using .I strict_sap.
.br

.br
When .I seg_sync is disabled, the segmenter will by default announce a new segment in the manifest(s) as soon as its size/offset is known or its name is known, but the segment (or part in LL-HLS) may still not be completely written/sent.
.br
This may result in temporary mismatches between segment/part size currently received versus size as advertized in manifest.
.br
When .I seg_sync is enabled, the segmenter will wait for the last byte of the fragment/segment to be pushed before announcing a new segment in the manifest(s). This can however slightly increase the latency in MPEG-DASH low-latency.
.br

.br
When (-sflush)[] is set to single, segmentation is skipped and a single segment is generated per input.
.br

.br
.SS Dynamic (real-time live) Mode
.br
The dasher does not perform real-time regulation by default.
.br
For regular segmentation, you should enable segment regulation .I sreg if your sources are not real-time.
.br
Example
.br
gpac -i source.mp4 -o live.mpd:segdur=2:profile=live:dmode=dynamic:sreg
.br

.br

.br
For low latency segmentation with fMP4, you will need to specify the following options:
.br
* cdur: set the fMP4 fragment duration
.br
* asto: set the availability time offset for DASH. This value should be equal or slightly greater than segment duration minus cdur
.br
* llhls: enable low latency for HLS
.br

.br
Note: .I llhls does not force cmaf mode to allow for multiplexed media in segments but it enforces to tfdt_traf in the muxer.
.br

.br
If your sources are not real-time, insert a reframer filter with real-time regulation
.br
Example
.br
gpac -i source.mp4 reframer:rt=on -o live.mpd:segdur=2:cdur=0.2:asto=1.8:profile=live:dmode=dynamic
.br

.br
This will create DASH segments of 2 seconds made of fragments of 200 ms and indicate to the client that requests can be made 1.8 seconds earlier than segment complete availability on server.
.br
Example
.br
gpac -i source.mp4 reframer:rt=on -o live.m3u8:segdur=2:cdur=0.2:llhls=br:dmode=dynamic
.br

.br
This will create DASH segments of 2 seconds made of fragments of 200 ms and produce HLS low latency parts using byte ranges in the final segment.
.br
Example
.br
gpac -i source.mp4 reframer:rt=on -o live.m3u8:segdur=2:cdur=0.2:llhls=sf:dmode=dynamic
.br

.br
This will create DASH segments of 2 seconds made of fragments of 200 ms and produce HLS low latency parts using dedicated files.
.br

.br
You can combine LL-HLS and DASH-LL generation:
.br
.br
gpac -i source.mp4 reframer:rt=on -o live.mpd:dual:segdur=2:cdur=0.2:asto=1.8:llhls=br:profile=live:dmode=dynamic
.br

.br

.br
For DASH, the filter will use the local clock for UTC anchor points in DASH.
.br
The filter can fetch and signal clock in other ways using .I utcs.
.br
Example
.br
[opts]:utcs=inband
.br

.br
This will use the local clock and insert in the MPD a UTCTiming descriptor containing the local clock.
.br
Example
.br
[opts]::utcs=http://time.akamai.com[::opts]
.br

.br
This will fetch time from http://time.akamai.com, use it as the UTC reference for segment generation and insert in the MPD a UTCTiming descriptor containing the time server URL.
.br
Note: if not set as a global option using --utcs=, you must escape the url using double :: or use other separators.
.br

.br
.SS Cue-driven segmentation
.br
The segmenter can take a list of instructions, or Cues, to use for the segmentation process, in which case only these are used to derive segment boundaries. Cues can be set through XML files or injected in input packets.
.br

.br
Cue files can be specified for the entire segmenter, or per PID using DashCue property.
.br
Cues are given in an XML file with a root element called <DASHCues>, with currently no attribute specified. The children are one or more <Stream> elements, with attributes:
.br
* id: integer for stream/track/PID ID
.br
* timescale: integer giving the units of following timestamps
.br
* mode: if present and value is edit, the timestamp are in presentation time (edit list applied) otherwise they are in media time
.br
* ts_offset: integer giving a value (in timescale) to subtract to the DTS/CTS values listed
.br

.br
The children of <Stream> are one or more <Cue> elements, with attributes:
.br
* sample: integer giving the sample/frame number of a sample at which splitting shall happen
.br
* dts: long integer giving the decoding time stamp of a sample at which splitting shall happen
.br
* cts: long integer giving the composition / presentation time stamp of a sample at which splitting shall happen
.br
Warning: Cues shall be listed in decoding order.
.br

.br
If the DashCue property of a PID equals inband, the PID will be segmented according to the CueStart property of input packets.
.br
This feature is typically combined with a list of files as input:
.br
.br
gpac -i list.m3u:sigcues -o res/live.mpd
.br

.br
This will load the flist filter in cue mode, generating continuous timelines from the sources and injecting a CueStart property at each new file.
.br

.br
If the .I cues option equals none, the DashCue property of input PIDs will be ignored.
.br

.br
.SS Manifest Generation only mode
.br
The segmenter can be used to generate manifests from already fragmented ISOBMFF inputs using .I sigfrag.
.br
In this case, segment boundaries are attached to each packet starting a segment and used to drive the segmentation.
.br
This can be used with single-track ISOBMFF sources, either single file or multi file.
.br
For single file source:
.br
- if onDemand .I profile is requested, sources have to be formatted as a DASH self-initializing media segment with the proper sidx.
.br
- templates are disabled.
.br
- .I sseg is forced for all profiles except onDemand ones.
.br
For multi files source:
.br
- input shall be a playlist containing the initial file followed by the ordered list of segments.
.br
- if no .I template is provided, the full or main .I profile will be used
.br
* if [-template]() is provided, it shall be correct: the filter will not try to guess one from the input file names and will not validate it either.
.br

.br
The manifest generation-only mode supports both MPD and HLS generation.
.br

.br
Example
.br
gpac -i ondemand_src.mp4 -o dash.mpd:sigfrag:profile=onDemand
.br

.br
This will generate a DASH manifest for onDemand Profile based on the input file.
.br
Example
.br
gpac -i ondemand_src.mp4 -o dash.m3u8:sigfrag
.br

.br
This will generate a HLS manifest based on the input file.
.br
Example
.br
gpac -i seglist.txt -o dash.mpd:sigfrag
.br

.br
This will generate a DASH manifest in Main Profile based on the input files.
.br
Example
.br
gpac -i seglist.txt:Template=$XInit=init$$q1/$Number$ -o dash.mpd:sigfrag:profile=live
.br

.br
This will generate a DASH manifest in live Profile based on the input files. The input file will contain init.mp4, q1/1.m4s, q1/2.m4s...
.br

.br
.SS Cue Generation only mode
.br
The segmenter can be used to only generate segment boundaries from a set of inputs using .I gencues, without generating manifests or output files.
.br
In this mode, output PIDs are declared directly rather than redirected to media segment files.
.br
The segmentation logic is not changed, and packets are forwarded with the same information and timing as in regular mode.
.br

.br
Output PIDs are forwarded with DashCue=inband property, so that any subsequent dasher follows the same segmentation process (see above).
.br

.br
The first packet in a segment has:
.br
- property FileNumber (and, if multiple files, FileName) set as usual
.br
- property CueStart set
.br
- property DFPStart=0 set if this is the first packet in a period
.br

.br
This mode can be used to pre-segment the streams for later processing that must take place before final dashing.
.br
Example
.br
gpac -i source.mp4 dasher:gencues cecrypt:cfile=roll_seg.xml -o live.mpd
.br

.br
This will allow the encrypter to locate dash boundaries and roll keys at segment boundaries.
.br
Example
.br
gpac -i s1.mp4 -i s2.mp4:#CryptInfo=clear:#Period=2 -i s3.mp4:#Period=3 dasher:gencues cecrypt:cfile=roll_period.xml -o live.mpd
.br

.br
If the DRM file uses keyRoll=period, this will generate:
.br
- first period crypted with one key
.br
- second period clear
.br
- third period crypted with another key
.br

.br
.SS Forced-Template mode
.br
When .I tpl_force is set, the .I template string is not analyzed nor modified for missing elements.
.br
This is typically used to redirect segments to a given destination regardless of the dash profile.
.br
Example
.br
gpac -i SRC -o null:ext=mpd:tpl_force --template=pipe://mypipe
.br

.br
This will trash the manifest and open mypipe as destination for the muxer result.
.br
Warning: Options for segment destination cannot be set through the .I template, global options must be used.
.br

.br
.SS Batch Operations
.br
The segmentation can be performed in multiple calls using a DASH context set with .I state.
.br
Between calls, the PIDs are reassigned by checking that the PID ID match between the calls and:
.br
- the input file names match between the calls
.br
- or the representation ID (and period ID if specified) match between the calls
.br

.br
If a PID is not matched, it will be assigned to a new period.
.br

.br
The default behaviour assume that the same inputs are used for segmentation and rebuilds a contiguous timeline at each new file start.
.br
If the inputs change but form a continuous timeline, [-keep_ts])() must be used to skip timeline reconstruction.
.br

.br
The inputs will be segmented for a duration of .I subdur if set, otherwise the input media duration.
.br
When inputs are over, they are restarted if .I loop is set otherwise a new period is created.
.br
To avoid this behaviour, the .I sflush option should be set to end or single, indicating that further sources for the same representations will be added in subsequent calls. When .I sflush is not off, the (-loop)[] option is ignored.
.br

.br
Example
.br
gpac -i SRC -o dash.mpd:segdur=2:state=CTX && gpac -i SRC -o dash.mpd:segdur=2:state=CTX
.br

.br
This will generate all dash segments for SRC (last one possibly shorter) and create a new period at end of input.
.br
Example
.br
gpac -i SRC -o dash.mpd:segdur=2:state=CTX:loop && gpac -i SRC -o dash.mpd:segdur=2:state=CTX:loop
.br

.br
This will generate all dash segments for SRC and restart SRC to fill-up last segment.
.br
Example
.br
gpac -i SRC -o dash.mpd:segdur=2:state=CTX:sflush=end && gpac -i SRC -o dash.mpd:segdur=2:state=CTX:sflush=end
.br

.br
This will generate all dash segments for SRC without looping/closing the period at end of input. Timestamps in the second call will be rewritten to be contiguous with timestamp at end of first call.
.br
Example
.br
gpac -i SRC1 -o dash.mpd:segdur=2:state=CTX:sflush=end:keep_ts && gpac -i SRC2 -o dash.mpd:segdur=2:state=CTX:sflush=end:keep_ts
.br

.br
This will generate all dash segments for SRC1 without looping/closing the period at end of input, then for SRC2. Timestamps of the sources will not be rewritten.
.br

.br
Note: The default behaviour of MP4Box -dash-ctx option is to set the (-loop)[] to true.
.br

.br
.SS Output redirecting
.br
When loaded implicitly during link resolution, the dasher will only link its outputs to the target sink
.br
Example
.br
gpac -i SRC -o URL1:OPTS1 -o URL2:OPTS1
.br

.br
This will create one dasher (with options OPTS1) for the URL1 and one dasher (with options OPTS1) for URL2.
.br
This allows dashing to multiple outputs with different formats, dash durations, etc.
.br

.br
It can be useful to redirect all the filter outputs to several sinks, for example to push through ROUTE and through HTTP the same segments.
.br
In order to do this, the filter MUST be explicitly loaded and all options related to dash and MP4 must be set either globally or on the dasher filter.
.br
Example
.br
gpac -i SRC dasher:cmfc:segdur=2 -o URL1 -o URL2
.br

.br
This will create a single dasher whose outputs (manifests and segments) will be redirected to the given URLs.
.br
When explicitly loading the filter, the .I dual option will be disabled unless .I mname is set to the alternate output name.
.br

.br
.SS Multiplexer development considerations
.br
Output multiplexers allowing segmented output must obey the following:
.br
- inspect packet properties
.br
 * FileNumber: if set, indicate the start of a new DASH segment
.br
 * FileName: if set, indicate the file name. If not present, output shall be a single file. This is only set for packet carrying the FileNumber property, and only on one PID (usually the first) for multiplexed outputs
.br
 * IDXName: gives the optional index name. If not present, index shall be in the same file as dash segment. Only used for MPEG-2 TS for now
.br
 * EODS: property is set on packets with no payload and no timestamp to signal the end of a DASH segment. This is only used when stopping/resuming the segmentation process, in order to flush segments without dispatching an EOS (see .I subdur )
.br
- for each segment done, send a downstream event on the first connected PID signaling the size of the segment and the size of its index if any
.br
- for multiplexers with init data, send a downstream event signaling the size of the init and the size of the global index if any
.br
- the following filter options are passed to multiplexers, which should declare them as arguments:
.br
 * noinit: disables output of init segment for the multiplexer (used to handle bitstream switching with single init in DASH)
.br
 * frag: indicates multiplexer shall use fragmented format (used for ISOBMFF mostly)
.br
 * subs_sidx=0: indicates an SIDX shall be generated - only added if not already specified by user
.br
 * xps_inband=all|no|both: indicates AVC/HEVC/... parameter sets shall be sent inband, out of band, or both
.br
 * nofragdef: indicates fragment defaults should be set in each segment rather than in init segment
.br

.br
The segmenter adds the following properties to the output PIDs:
.br
* DashMode: identifies VoD (single file with global index) or regular DASH mode used by segmenter
.br
* DashDur: identifies target DASH segment duration - this can be used to estimate the SIDX size for example
.br
* LLHLS: identifies LLHLS is used; the multiplexer must send fragment size events back to the dasher, and set LLHLSFragNum on the first packet of each fragment
.br
* SegSync: indicates that fragments/segments must be completely flushed before sending back size events
.br

.br
.SH Options (expert):
.LP
.br
segdur (frac, default: 0/0):   target segment duration in seconds. A value less than or equal to 0 defaults to 1.0 second
.br
tpl (bool, default: true):     use template mode (multiple segment, template URLs)
.br
stl (bool, default: false):    use segment timeline (ignored in on_demand mode)
.br
dmode (enum, default: static, updatable): dash content mode
.br
* static: static content
.br
* dynamic: live generation
.br
* dynlast: last call for live, will turn the MPD into static
.br
* dynauto: live generation and move to static manifest upon end of stream
.br

.br
sseg (bool, default: false):   single segment is used
.br
sfile (bool, default: false):  use a single file for all segments (default in on_demand)
.br
align (bool, default: true):   enable segment time alignment between representations
.br
sap (bool, default: true):     enable splitting segments at SAP boundaries
.br
mix_codecs (bool, default: false): enable mixing different codecs in an adaptation set
.br
ntp (enum, default: rem):      insert/override NTP clock at the beginning of each segment
.br
* rem: removes NTP from all input packets
.br
* yes: inserts NTP at each segment start
.br
* keep: leaves input packet NTP untouched
.br

.br
no_sar (bool, default: false): do not check for identical sample aspect ratio for adaptation sets
.br
bs_switch (enum, default: def): bitstream switching mode (single init segment)
.br
* def: resolves to off for onDemand and inband for live
.br
* off: disables BS switching
.br
* on: enables it if same decoder configuration is possible
.br
* inband: moves decoder config inband if possible
.br
* both: inband and outband parameter sets
.br
* pps: moves PPS and APS inband, keep VPS, SPS and DCI out of band (used for VVC RPR)
.br
* force: enables it even if only one representation
.br
* multi: uses multiple stsd entries in ISOBMFF
.br

.br
template (str):                template string to use to generate segment name
.br
segext (str):                  file extension to use for segments
.br
initext (str):                 file extension to use for the init segment
.br
muxtype (enum, default: auto): muxtype to use for the segments
.br
* mp4: uses ISOBMFF format
.br
* ts: uses MPEG-2 TS format
.br
* mkv: uses Matroska format
.br
* webm: uses WebM format
.br
* ogg: uses OGG format
.br
* raw: uses raw media format (disables multiplexed representations)
.br
* auto: guesses format based on extension, defaults to mp4 if no extension is provided
.br

.br
rawsub (bool, default: no):    use raw subtitle format instead of encapsulating in container
.br
asto (dbl, default: 0):        availabilityStartTimeOffset to use in seconds. A negative value simply increases the AST, a positive value sets the ASToffset to representations
.br
profile (enum, default: auto): target DASH profile. This will set default option values to ensure conformance to the desired profile. For MPEG-2 TS, only main and live are used, others default to main
.br
* auto: turns profile to live for dynamic and full for non-dynamic
.br
* live: DASH live profile, using segment template
.br
* onDemand: MPEG-DASH live profile
.br
* main: MPEG-DASH main profile, using segment list
.br
* full: MPEG-DASH full profile
.br
* hbbtv1.5.live: HBBTV 1.5 DASH profile
.br
* dashavc264.live: DASH-IF live profile
.br
* dashavc264.onDemand: DASH-IF onDemand profile
.br
* dashif.ll: DASH IF low-latency profile (set UTC server to time.akamai.com if none set)
.br

.br
profX (str):                   list of profile extensions, as used by DASH-IF and DVB. The string will be colon-concatenated with the profile used. If starting with +, the profile string by default is erased and + is skipped
.br
cp (enum, default: set):       content protection element location
.br
* set: in adaptation set element
.br
* rep: in representation element
.br
* both: in both adaptation set and representation elements
.br

.br
pssh (enum, default: v):       storage mode for PSSH box
.br
* f: stores in movie fragment only
.br
* v: stores in movie only, or movie and fragments if key roll is detected
.br
* m: stores in mpd only
.br
* mf: stores in mpd and movie fragment
.br
* mv: stores in mpd and movie
.br
* n: discard pssh from mpd and segments
.br

.br
buf (sint, default: -100):     min buffer duration in ms. negative value means percent of segment duration (e.g. -150 = 1.5*seg_dur)
.br
spd (sint, default: 0):        suggested presentation delay in ms
.br
timescale (sint, default: 0):  set timescale for timeline and segment list/template. A value of 0 picks up the first timescale of the first stream in an adaptation set. A negative value forces using stream timescales for each timed element (multiplication of segment list/template/timelines). A positive value enforces the MPD timescale
.br
check_dur (bool, default: true): check duration of sources in period, trying to have roughly equal duration. Enforced whenever period start times are used
.br
skip_seg (bool, default: false): increment segment number whenever an empty segment would be produced - NOT DASH COMPLIANT
.br
title (str):                   MPD title
.br
source (str):                  MPD Source
.br
info (str):                    MPD info url
.br
cprt (str):                    MPD copyright string
.br
lang (str):                    language of MPD Info
.br
location (strl):               set MPD locations to given URL
.br
base (strl):                   set base URLs of MPD
.br
refresh (dbl, default: 0):     refresh rate for dynamic manifests, in seconds (a negative value sets the MPD duration, value 0 uses dash duration)
.br
tsb (dbl, default: 30):        time-shift buffer depth in seconds (a negative value means infinity)
.br
keep_segs (bool, default: false): do not delete segments no longer in time-shift buffer
.br
ast (str):                     set start date (as xs:date, e.g. YYYY-MM-DDTHH:MM:SSZ) for live mode. Default is now. !! Do not use with multiple periods, nor when DASH duration is not a multiple of GOP size !!
.br
state (str):                   path to file used to store/reload state info when simulating live. This is stored as a valid MPD with GPAC XML extensions
.br
keep_ts (bool, default: false): do not shift timestamp when reloading a context
.br
loop (bool, default: false):   loop sources when dashing with subdur and state. If not set, a new period is created once the sources are over
.br
subdur (dbl, default: 0):      maximum duration of the input file to be segmented. This does not change the segment duration, segmentation stops once segments produced exceeded the duration
.br
split (bool, default: true):   enable cloning samples for text/metadata/scene description streams, marking further clones as redundant
.br
hlsc (bool, default: false):   insert clock reference in variant playlist in live HLS
.br
cues (str):                    set cue file
.br
strict_cues (bool, default: false): strict mode for cues, complains if splitting is not on SAP type 1/2/3 or if unused cue is found
.br
strict_sap (enum, default: off): strict mode for sap
.br
* off: ignore SAP types for PID other than video, enforcing AdaptationSet@startsWithSAP=1
.br
* sig: same as -off but keep AdaptationSet@startsWithSAP to the true SAP value
.br
* on: warn if any PID uses SAP 3 or 4 and switch to FULL profile
.br
* intra: ignore SAP types greater than 3 on all media types
.br

.br
subs_sidx (sint, default: -1): number of subsegments per sidx. Negative value disables sidx. Only used to inherit sidx option of destination
.br
cmpd (bool, default: false):   skip line feed and spaces in MPD XML for compactness
.br
styp (str):                    indicate the 4CC to use for styp boxes when using ISOBMFF output
.br
dual (bool):                   indicate to produce both MPD and M3U files
.br
segcts (bool):                 compute the segment number by dividing the first CTS by .I segdur
.br
sigfrag (bool):                use manifest generation only mode
.br
sbound (enum, default: out):   indicate how the theoretical segment start TSS (= segment_number * duration) should be handled
.br
* out: segment split as soon as TSS is exceeded (TSS <= segment_start)
.br
* closest: segment split at closest SAP to theoretical bound
.br
* in: TSS is always in segment (TSS >= segment_start)
.br

.br
reschedule (bool, default: false): reschedule sources with no period ID assigned once done (dynamic mode only)
.br
sreg (bool, default: false):   regulate the session
.br
- when using subdur and context, only generate segments from the past up to live edge
.br
- otherwise in dynamic mode without context, do not generate segments ahead of time
.br

.br
scope_deps (bool, default: true): scope PID dependencies to be within source. If disabled, PID dependencies will be checked across all input PIDs regardless of their sources
.br
utcs (str):                    URL to use as time server / UTCTiming source. Special value inband enables inband UTC (same as publishTime), special prefix xsd@ uses xsDateTime schemeURI rather than ISO
.br
sflush (enum, default: off):   segment flush mode - see filter help:
.br
* off: no specific actions
.br
* single: force generating a single segment for each input
.br
* end: skip loop detection and clamp duration adjustment at end of input, used for state mode
.br

.br
last_seg_merge (bool, default: false): force merging last segment if less than half the target duration
.br
mha_compat (enum, default: no): adaptation set generation mode for compatible MPEG-H Audio profile
.br
* no: only generate the adaptation set for the main profile
.br
* comp: only generate the adaptation sets for all compatible profiles
.br
* all: generate the adaptation set for the main profile and all compatible profiles
.br

.br
mname (str):                   output manifest name for ATSC3 multiplexing (using 'm3u8' only toggles HLS generation)
.br
llhls (enum, default: off):    HLS low latency type
.br
* off: do not use LL-HLS
.br
* br: use LL-HLS with byte-range for segment parts, pointing to full segment (DASH-LL compatible)
.br
* sf: use separate files for segment parts (post-fixed .1, .2 etc.)
.br
* brsf: generate two sets of manifest, one for byte-range and one for files (_IF added before extension of manifest)
.br

.br
hlsdrm (str):                  cryp file info for HLS full segment encryption
.br
hlsx (strl):                   list of string to append to master HLS header before variants with ['#foo','#bar=val'] added as #foo \n #bar=val
.br
hlsiv (bool, default: true):   inject IV in variant HLS playlist
.br
ll_preload_hint (bool, default: true): inject preload hint for LL-HLS
.br
ll_rend_rep (bool, default: true): inject rendition reports for LL-HLS
.br
ll_part_hb (dbl, default: -1): user-defined part hold-back for LLHLS, negative value means 3 times max part duration in session
.br
ckurl (str):                   set the ClearKey URL common to all encrypted streams (overriden by CKUrl pid property)
.br
hls_absu (enum, default: no):  use absolute url in HLS generation using first URL in base
.br
* no: do not use absolute URL
.br
* var: use absolute URL only in variant playlists
.br
* mas: use absolute URL only in master playlist
.br
* both: use absolute URL everywhere
.br

.br
hls_ap (bool, default: false): use audio as primary media instead of video when generating playlists
.br
seg_sync (enum, default: auto): control how waiting on last packet P of fragment/segment to be written impacts segment injection in manifest
.br
* no: do not wait for P
.br
* yes: wait for P
.br
* auto: wait for P if HLS is used
.br

.br
cmaf (enum, default: no):      use cmaf guidelines
.br
* no: CMAF not enforced
.br
* cmfc: use CMAF cmfc guidelines
.br
* cmf2: use CMAF cmf2 guidelines
.br

.br
pswitch (enum, default: single): period switch control mode
.br
* single: change period if PID configuration changes
.br
* force: force period switch at each PID reconfiguration instead of absorbing PID reconfiguration (for splicing or ad insertion not using periodID)
.br
* stsd: change period if PID configuration changes unless new configuration was advertised in initial config
.br

.br
chain (str):                   URL of next MPD for regular chaining
.br
chain_fbk (str):               URL of fallback MPD
.br
gencues (bool, default: false): only insert segment boundaries and do not generate manifests
.br
force_init (bool, default: false): force init segment creation in bitstream switching mode
.br
keep_src (bool, default: false): keep source URLs in manifest generation mode
.br
gxns (bool, default: false):   insert some gpac extensions in manifest (for now, only tfdt of first segment)
.br
dkid (enum, default: auto):    control injection of default KID in MPD
.br
* off: default KID not injected
.br
* on: default KID always injected
.br
* auto: default KID only injected if no key roll is detected (as per DASH-IF guidelines)
.br

.br
tpl_force (bool, default: false): use template string as is without trying to add extension or solve conflicts in names
.br
inband_event (bool, default: false): insert a default inband event stream in the DASH manifest
.br
ttml_agg (bool, default: false): force aggregation of TTML samples of a DASH segment into a single sample
.br

.br
.SH tileagg
.LP
.br
Description: HEVC Tile aggregator
.br

.br
This filter aggregates a set of split tiled HEVC streams (hvt1 or hvt2 in ISOBMFF) into a single HEVC stream.
.br

.br
.SH Options (expert):
.LP
.br
tiledrop (uintl, updatable):   specify indexes of tiles to drop
.br
ttimeout (uint, default: 10000, updatable): number of milliseconds to wait until considering a tile packet lost, 0 waits forever
.br

.br
.SH tilesplit
.LP
.br
Description: HEVC Tile splitter
.br

.br
This filter splits an HEVC tiled stream into tiled HEVC streams (hvt1 or hvt2 in ISOBMFF).
.br
The filter will move to passthrough mode if the bitstream is not tiled.
.br
If the Bitrate property is set on the input PID, the output tile PIDs will have a bitrate set to (Bitrate - 10k)/nb_opids, 10 kbps being reserved for the base.
.br

.br
Each tile PID will be assigned the following properties:
.br
* `ID`: equal to the base PID ID (same as input) plus the 1-based index of the tile in raster scan order.
.br
* `TileID`: equal to the 1-based index of the tile in raster scan order.
.br

.br
Warning: The filter does not check if tiles are independently-coded (MCTS) !
.br

.br
Warning: Support for dynamic changes of tiling grid has not been tested !
.br

.br
.SH Options (expert):
.LP
.br
tiledrop (uintl, updatable):   specify indexes of tiles to drop (0-based, in tile raster scan order)
.br

.br
.SH pin
.LP
.br
Description: Pipe input
.br

.br
This filter handles generic input pipes (mono-directional) in blocking or non blocking mode.
.br
Warning: Input pipes cannot seek.
.br
Data format of the pipe may be specified using extension (either in file name or through .I ext) or MIME type through .I mime.
.br
Note: Unless disabled at session level (see .I -no-probe ), file extensions are usually ignored and format probing is done on the first data block.
.br

.br
.SH stdin pipe
.LP
.br
The filter can handle reading from stdin, by using - or stdin as input file name.
.br
Example
.br
gpac -i - vout
.br
gpac -i stdin vout
.br

.br

.br
When reading from stdin, the default timeout is 10 seconds.
.br
.SH Named pipes
.LP
.br
The filter can handle reading from named pipes. The associated protocol scheme is pipe:// when loaded as a generic input (e.g. -i pipe://URL where URL is a relative or absolute pipe name).
.br
On Windows hosts, the default pipe prefix is \\.\pipe\gpac\ if no prefix is set.
.br
dst=mypipe resolves in \\.\pipe\gpac\mypipe
.br
dst=\\.\pipe\myapp\mypipe resolves in \\.\pipe\myapp\mypipe
.br
Any destination name starting with \\ is used as is, with \ translated in /.
.br

.br
Input pipes are created by default in non-blocking mode.
.br

.br
The filter can create the pipe if not found using .I mkp. On windows hosts, this will create a pipe server.
.br
On non windows hosts, the created pipe will delete the pipe file upon filter destruction.
.br
  
.br
Input pipes can be setup to run forever using .I ka. In this case:
.br
- any potential pipe close on the writing side will be ignored
.br
- pipeline flushing will be triggered upon pipe close if .I sigflush is set
.br
- final end of stream will be triggered upon session close.
.br
  
.br
This can be useful to pipe raw streams from different process into gpac:
.br
* Receiver side: gpac -i pipe://mypipe:ext=.264:mkp:ka
.br
* Sender side: cat raw1.264 > mypipe && gpac -i raw2.264 -o pipe://mypipe:ext=.264  
.br
The pipeline flush is signaled as EOS while keeping the stream active.
.br
This is typically needed for mux filters waiting for EOS to flush their data.
.br
  
.br
If .I marker is set, the following strings (all 8-bytes with 
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    name of source pipe
.br
block_size (uint, default: 5000): buffer size used to read pipe
.br
ext (str):                     indicate file extension of pipe data
.br
mime (str):                    indicate mime type of pipe data
.br
blk (bool, default: false):    open pipe in block mode
.br
ka (bool, default: false):     keep-alive pipe when end of input is detected
.br
mkp (bool, default: false):    create pipe if not found
.br
sigflush (bool, default: false): signal end of stream upon pipe close - cf filter help
.br
marker (bool, default: false): inspect payload for flush and reconfigure signals - cf filter help
.br
bpcnt (uint, default: 0):      number of broken pipe allowed before exiting, 0 means forever
.br
timeout (uint, default: 0):    timeout in ms before considering input is in end of stream (0: no timeout)
.br

.br
.SH pout
.LP
.br
Description: Pipe output
.br

.br
This filter handles generic output pipes (mono-directional) in blocking mode only.
.br
Warning: Output pipes do not currently support non blocking mode.
.br
The associated protocol scheme is pipe:// when loaded as a generic output (e.g. -o pipe://URL where URL is a relative or absolute pipe name).
.br
Data format of the pipe shall be specified using extension (either in filename or through .I ext option) or MIME type through .I mime
.br
The pipe name indicated in .I dst can use template mechanisms from gpac, e.g. dst=pipe_$ServiceID$
.br

.br
On Windows hosts, the default pipe prefix is \\.\pipe\gpac\ if no prefix is set 
.br
dst=mypipe resolves in \\.\pipe\gpac\mypipe
.br
dst=\\.\pipe\myapp\mypipe resolves in \\.\pipe\myapp\mypipe
.br
Any destination name starting with \\ is used as is, with \ translated in /
.br

.br
The pipe input can create the pipe if not found using .I mkp. On windows hosts, this will create a pipe server.
.br
On non windows hosts, the created pipe will delete the pipe file upon filter destruction.
.br
The pipe can be kept alive after a broken pipe is detected using .I ka. This is typically used when clients crash/exits and resumes.
.br
When a keep-alive pipe is broken, input data is discarded and the filter will keep trashing data as fast as possible.
.br
It is therefore recommended to use this mode with real-time inputs (use a reframer if needed).
.br
If .I marker is set, the string GPACPIF (8 bytes including 0-terminator) will be written to the pipe at each detected pipeline flush.
.br
Pipeline flushing is currently triggered by DASH segment end or ISOBMF fragment end.
.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    name of destination pipe
.br
ext (str):                     indicate file extension of pipe data
.br
mime (str):                    indicate mime type of pipe data
.br
dynext (bool, default: false): indicate the file extension is set by filter chain, not dst
.br
start (dbl, default: 0.0):     set playback start offset. A negative value means percent of media duration with -1 equal to duration
.br
speed (dbl, default: 1.0):     set playback speed. If negative and start is 0, start is set to -1
.br
mkp (bool, default: false):    create pipe if not found
.br
block_size (uint, default: 5000): buffer size used to write to pipe, Windows only
.br
ka (bool, default: false):     keep pipe alive when broken pipe is detected
.br
marker (bool, default: false): inject marker upon pipeline flush events
.br

.br
.SH gsfmx
.LP
.br
Description: GSF multiplexer
.br

.br
This filter provides GSF (GPAC Serialized Format) multiplexing.
.br
It serializes the stream states (config/reconfig/info update/remove/eos) and packets of input PIDs. This allows either saving to file a session, or forwarding the state/data of streams to another instance of GPAC using either pipes or sockets. Upstream events are not serialized.
.br

.br
The default behavior does not insert sequence numbers. When running over general protocols not ensuring packet order, this should be inserted.
.br
The serializer sends tune-in packets (global and per PID) at the requested carousel rate - if 0, no carousel. These packets are marked as redundant so that they can be discarded by output filters if needed.
.br

.br
.SH Encryption
.LP
.br
The stream format can be encrypted in AES 128 CBC mode. For all packets, the packet header (header, size, frame size/block offset and optional seq num) are in the clear and the following bytes until the last byte of the last multiple of block size (16) fitting in the payload are encrypted.
.br
For data packets, each fragment is encrypted individually to avoid error propagation in case of losses.
.br
For other packets, the entire packet is encrypted before fragmentation (fragments cannot be processed individually).
.br
For header/tunein packets, the first 25 bytes after the header are in the clear (signature,version,IV and pattern).
.br
The .I IV is constant to avoid packet overhead, randomly generated if not set and sent in the initial stream header. Pattern mode can be used (cf CENC cbcs) to encrypt K block and leave N blocks in the clear.
.br

.br
.SH Filtering properties
.LP
.br
The header/tunein packet may get quite big when all PID properties are kept. In order to help reduce its size, the .I minp option can be used: this will remove all built-in properties marked as droppable (cf property help) as well as all non built-in properties.
.br
The .I skp option may also be used to specify which property to drop:
.br
.br
skp="4CC1,Name2
.br

.br
This will remove properties of type 4CC1 and properties (built-in or not) of name Name2.
.br

.br
.SH File mode
.LP
.br
By default the filter only accepts framed media streams as input PID, not files. This can be changed by explicitly loading the filter with .I ext or .I dst set.
.br
Example
.br
gpac -i source.mp4 gsfmx:dst=manifest.mpd -o dump.gsf
.br

.br
This will DASH the source and store every files produced as PIDs in the GSF mux.
.br
In order to demultiplex such a file, the gsfdmxfilter will likely need to be explicitly loaded:
.br
.br
gpac -i mux.gsf gsfdmx -o dump/$File$:dynext
.br

.br
This will extract all files from the GSF mux.
.br

.br
By default when working in file mode, the filter only accepts PIDs of type file as input.
.br
To allow a mix of files and streams, use .I mixed:
.br
.br
gpac -i source.mp4 gsfmx:dst=manifest.mpd:mixed -o dump.gsf
.br

.br
This will DASH the source, store the manifest file and the media streams with their packet properties in the GSF mux.
.br

.br
.SH Options (expert):
.LP
.br
sigsn (bool, default: false):  signal packet sequence number after header field and before size field. Sequence number is per PID, encoded on 16 bits. Header packet does not have a SN
.br
sigdur (bool, default: true):  signal duration
.br
sigbo (bool, default: false):  signal byte offset
.br
sigdts (bool, default: true):  signal decoding timestamp
.br
dbg (enum, default: no):       set debug mode
.br
* no: disable debug
.br
* nodata: force packet size to 0
.br
* nopck: skip packet
.br

.br
key (mem):                     encrypt packets using given key
.br
IV (mem):                      set IV for encryption - a constant IV is used to keep packet overhead small (cbcs-like)
.br
pattern (frac, default: 1/0):  set nb_crypt / nb_skip block pattern. default is all encrypted
.br
mpck (uint, default: 0):       set max packet size. 0 means no fragmentation (each AU is sent in one packet)
.br
magic (str):                   magic string to append in setup packet
.br
skp (str):                     comma separated list of PID property names to skip
.br
minp (bool, default: false):   include only the minimum set of properties required for stream processing
.br
crate (dbl, default: 0):       carousel period for tune-in info in seconds
.br
ext (str):                     file extension for file mode
.br
dst (str):                     target URL in file mode
.br
mixed (bool, default: false):  allow GSF to contain both files and media streams
.br

.br
.SH gsfdmx
.LP
.br
Description: GSF demultiplexer
.br

.br
This filter provides GSF (GPAC Serialized Format) demultiplexing.
.br
It de-serializes the stream states (config/reconfig/info update/remove/eos) and packets in the GSF bytestream.
.br
This allows either reading a session saved to file, or receiving the state/data of streams from another instance of GPAC using either pipes or sockets
.br

.br
The stream format can be encrypted in AES 128 CBC mode, in which case the demultiplexing filter must be given a 128 bit key.
.br

.br
.SH Options (expert):
.LP
.br
key (mem):                     key for decrypting packets
.br
magic (str):                   magic string to check in setup packet
.br
mq (uint, default: 4):         set max packet queue length for loss detection. 0 will flush incomplete packet when a new one starts
.br
pad (uint, default: 0, minmax: 0-255): byte value used to pad lost packets
.br

.br
.SH sockout
.LP
.br
Description: UDP/TCP output
.br

.br
This filter handles generic output sockets (mono-directional) in blocking mode only.
.br
The filter can work in server mode, waiting for source connections, or in client mode, directly connecting to a server.
.br
In server mode, the filter can be instructed to keep running at the end of the stream.
.br
In server mode, the default behavior is to keep input packets when no more clients are connected; this can be adjusted though the .I kp option, however there is no realtime regulation of how fast packets are dropped.
.br
If your sources are not real time, consider adding a real-time scheduler in the chain (cf reframer filter), or set the send .I rate option.
.br

.br
- UDP sockets are used for destinations URLs formatted as udp://NAME
.br
- TCP sockets are used for destinations URLs formatted as tcp://NAME
.br
- UDP unix domain sockets are used for destinations URLs formatted as udpu://NAME
.br
- TCP unix domain sockets are used for destinations URLs formatted as tcpu://NAME
.br

.br
When ports are specified in the URL and the default option separators are used (see gpac -h doc), the URL must either:
.br
- have a trailing '/', e.g. udp://localhost:1234/[:opts]
.br
- use gpac escape, e.g. udp://localhost:1234[:gpac:opts]
.br

.br
The socket output can be configured to drop or revert packet order for test purposes.
.br
A window size in packets is specified as the drop/revert fraction denominator, and the index of the packet to drop/revert is given as the numerator/
.br
If the numerator is 0, a packet is randomly chosen in that window.
.br
Example
.br
:pckd=4/10
.br

.br
This drops every 4th packet of each 10 packet window.
.br
Example
.br
:pckr=0/100
.br

.br
This reverts the send order of one random packet in each 100 packet window.
.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    URL of destination
.br
sockbuf (uint, default: 65536): block size used to read file
.br
port (uint, default: 1234):    default port if not specified
.br
ifce (cstr):                   default multicast interface
.br
ext (str):                     file extension of pipe data
.br
mime (str):                    mime type of pipe data
.br
listen (bool, default: false): indicate the output socket works in server mode
.br
maxc (uint, default: +I):      max number of concurrent connections
.br
ka (bool, default: false):     keep socket alive if no more connections
.br
kp (bool, default: true):      keep packets in queue if no more clients
.br
start (dbl, default: 0.0):     set playback start offset. A negative value means percent of media duration with -1 equal to duration
.br
speed (dbl, default: 1.0):     set playback speed. If negative and start is 0, start is set to -1
.br
rate (uint, default: 0):       set send rate in bps, disabled by default (as fast as possible)
.br
pckr (frac, default: 0/0):     reverse packet every N
.br
pckd (frac, default: 0/0):     drop packet every N
.br
ttl (uint, default: 0, minmax: 0-127): multicast TTL
.br

.br
.SH rfav1
.LP
.br
Description: AV1/IVF/VP9/IAMF reframer
.br

.br
This filter parses AV1 OBU, AV1 AnnexB or IVF with AV1 or VP9 files/data and outputs corresponding visual PID and frames. It also parses IAMF OBU and outputs corresponding temporal units containing audio frames and parameter blocks.
.br

.br
.SH Options (expert):
.LP
.br
fps (frac, default: 0/1000):   import frame rate (0 default to FPS from bitstream or 25 Hz)
.br
index (dbl, default: -1.0):    indexing window length. If 0, bitstream is not probed for duration. A negative value skips the indexing if the source file is larger than 20M (slows down importers) unless a play with start range > 0 is issued
.br
importer (bool, default: false): compatibility with old importer
.br
deps (bool, default: false):   import sample dependency information
.br
notime (bool, default: false): ignore input timestamps, rebuild from 0
.br
temporal_delim (bool, default: false): keep temporal delimiters in reconstructed frames
.br
bsdbg (enum, default: off):    debug OBU parsing in media@debug logs
.br
* off: not enabled
.br
* on: enabled
.br
* full: enable with number of bits dumped
.br

.br

.br
.SH ufobu
.LP
.br
Description: IVF/OBU/annexB rewriter
.br

.br
This filter rewrites VPx or AV1 bitstreams into a IVF, annexB or OBU sequence.
.br
The temporal delimiter OBU is re-inserted in annexB (.av1 and .av1bfiles, with obu_size set) and OBU sequences (.obufiles, without obu_size)
.br
Timecode metadata optionally inserted
.br
Note: VP8/9 codecs will only use IVF output (equivalent to file extension .ivf or :ext=ivf set on output).
.br

.br
.SH Options (expert):
.LP
.br
rcfg (bool, default: true):    force repeating decoder config at each I-frame
.br

.br
.SH nvdec
.LP
.br
Description: NVidia decoder
.br

.br
This filter decodes MPEG-2, MPEG-4 Part 2, AVC|H264 and HEVC streams through NVidia decoder. It allows GPU frame dispatch or direct frame copy.
.br
If the SDK is not available, the configuration key nvdec@disabled will be written in configuration file to avoid future load attempts.
.br

.br
The absolute path to cuda lib can be set using the cuda_lib option in core or temp section of the config file, e.g. -cfg=temp:cuda_lib=PATH_TO_CUDA
.br
The absolute path to cuvid lib can be set using the cuvid_lib option in core or temp section of the config file, e.g. -cfg=temp:cuvid_lib=PATH_TO_CUDA
.br

.br
.SH Options (expert):
.LP
.br
num_surfaces (uint, default: 20): number of hardware surfaces to allocate
.br
unload (enum, default: no):    decoder unload mode
.br
* no: keep inactive decoder alive
.br
* destroy: destroy inactive decoder
.br
* reuse: detach decoder from inactive PIDs and reattach to active ones
.br

.br
vmode (enum, default: cuvid):  video decoder backend
.br
* cuvid: use dedicated video engines directly
.br
* cuda: use a CUDA-based decoder if faster than dedicated engines
.br
* dxva: go through DXVA internally if possible (requires D3D9)
.br

.br
fmode (enum, default: gl):     frame output mode
.br
* copy: each frame is copied and dispatched
.br
* single: frame data is only retrieved when used, single memory space for all frames (not safe if multiple consumers)
.br
* gl: frame data is mapped to an OpenGL texture
.br

.br

.br
.SH routein
.LP
.br
Description: MABR & ROUTE input
.br

.br
This filter is a receiver for file delivery over multicast. It currently supports ATSC 3.0, generic ROUTE and DVB-MABR flute.
.br
- ATSC 3.0 mode is identified by the URL atsc://.
.br
- Generic ROUTE mode is identified by the URL route://IP:PORT.
.br
- DVB-MABR mode is identified by the URL mabr://IP:PORT pointing to the bootstrap FLUTE channel carrying the multicast gateway configuration.
.br

.br
The filter can work in cached mode, source mode or standalone mode.
.br
.SH Cached mode
.LP
.br
The cached mode is the default filter behavior. It populates GPAC HTTP Cache with the received files, using http://gmcast/serviceN/ as service root, N being the multicast service ID.
.br
In cached mode, repeated files are always pushed to cache.
.br
The maximum number of media segment objects in cache per service is defined by .I nbcached; this is a safety used to force object removal in case DASH client timing is wrong and some files are never requested at cache level.
.br
  
.br
The cached MPD is assigned the following headers:
.br
* `x-mcast`: boolean value, if yes indicates the file comes from a multicast.
.br
* `x-mcast-first-seg`: string value, indicates the name of the first segment (completely or currently being) retrieved from the broadcast.
.br
* `x-mcast-ll`: boolean value, if yes indicates that the indicated first segment is currently being received (low latency signaling).
.br
* `x-mcast-loop`: boolean value, if yes indicates a loop (e.g. pcap replay) in the service has been detected - only checked if .I cloop is set.
.br
  
.br
The cached files are assigned the following headers:
.br
* `x-mcast`: boolean value, if yes indicates the file comes from a multicast.
.br

.br
If .I max_segs is set, file deletion event will be triggered in the filter chain.
.br

.br
.SH Source mode
.LP
.br
In source mode, the filter outputs files on a single output PID of type file. The files are dispatched once fully received, the output PID carries a sequence of complete files. Repeated files are not sent unless requested.
.br
Example
.br
gpac -i atsc://gcache=false -o $ServiceID$/$File$:dynext
.br

.br
This will grab the files and forward them as output PIDs, consumed by the fout filter.
.br

.br
If needed, one PID per TSI can be used rather than a single PID using .I stsi. This avoids mixing files of different mime types on the same PID (e.g. HAS manifest and ISOBMFF).
.br
In this mode, each packet starting a new file carries the file name as a property. If .I repair is enabled in this mode, progressive dispatch of files will be done.
.br

.br
If .I max_segs is set, file deletion event will be triggered in the filter chain.
.br
Note: The .I nbcached option is ignored in this mode.
.br

.br
.SH Standalone mode
.LP
.br
In standalone mode, the filter does not produce any output PID and writes received files to the .I odir directory.
.br
Example
.br
gpac -i atsc://:odir=output
.br

.br
This will grab the files and write them to output directory.
.br

.br
In this mode, files are always written once completely recieved, regardless of the .I repair option.
.br

.br
If .I max_segs is set, old files will be deleted.
.br
Note: The .I nbcached option is ignored in this mode.
.br

.br
.SH File Repair
.LP
.br
In case of losses or incomplete segment reception (during tune-in), the files are patched as follows:
.br
* MPEG-2 TS: all lost ranges are adjusted to 188-bytes boundaries, and transformed into NULL TS packets.
.br
* ISOBMFF: all top-level boxes are scanned, and incomplete boxes are transformed in free boxes, except mdat:
.br
 - if repair=simple, mdat is kept if incomplete (broken file),
.br
 - if repair=strict, mdat is moved to free if incomplete and the preceeding moof is also moved to free.
.br

.br
If .I kc option is set, corrupted files will be kept. If .I fullseg is not set and files are only partially received, they will be kept.
.br

.br
.SH Interface setup
.LP
.br
On some systems (OSX), when using VM packet replay, you may need to force multicast routing on your local interface.
.br
For ATSC, you will have to do this for the base signaling multicast (224.0.23.60):
.br
.br
route add -net 224.0.23.60/32 -interface vboxnet0
.br

.br
Then for each multicast service in the multicast:
.br
.br
route add -net 239.255.1.4/32 -interface vboxnet0
.br

.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    URL of source content
.br
ifce (str):                    default interface to use for multicast. If NULL, the default system interface will be used
.br
gcache (bool, default: true):  indicate the files should populate GPAC HTTP cache
.br
tunein (sint, default: -2):    service ID to bootstrap on. Special values:
.br
* 0: tune to no service
.br
* -1: tune all services
.br
* -2: tune on first service found
.br
* -3: detect all services and do not join multicast
.br

.br
buffer (uint, default: 0x80000): receive buffer size to use in bytes
.br
timeout (uint, default: 5000): timeout in ms after which tunein fails
.br
nbcached (uint, default: 8):   number of segments to keep in cache per service
.br
kc (bool, default: false):     keep corrupted file
.br
skipr (bool, default: true):   skip repeated files (ignored in cache mode)
.br
stsi (bool, default: false):   define one output PID per tsi/serviceID (ignored in cache mode)
.br
stats (uint, default: 1000):   log statistics at the given rate in ms (0 disables stats)
.br
tsidbg (uint, default: 0):     gather only objects with given TSI (debug)
.br
max_segs (uint, default: 0):   maximum number of segments to keep on disk
.br
odir (str):                    output directory for standalone mode
.br
reorder (bool, default: true): consider packets are not always in order - if false, this will evaluate an LCT object as done when TOI changes
.br
cloop (bool, default: false):  check for loops based on TOI (used for capture replay)
.br
rtimeout (uint, default: 500000): default timeout in µs to wait when gathering out-of-order packets
.br
fullseg (bool, default: false): only dispatch full segments in cache mode (always true for other modes)
.br
repair (enum, default: strict): repair mode for corrupted files
.br
* no: no repair is performed
.br
* simple: simple repair is performed (incomplete mdat boxes will be kept)
.br
* strict: incomplete mdat boxes will be lost as well as preceding moof boxes
.br
* full: HTTP-based repair of all lost packets
.br

.br
repair_urls (strl):            repair servers urls
.br
max_sess (uint, default: 1):   max number of concurrent HTTP repair sessions
.br
llmode (bool, default: true):  enable low-latency access
.br
dynsel (bool, default: true):  dynamically enable and disable multicast groups based on their selection state
.br
range_merge (uint, default: 10000): merge ranges in HTTP repair if distant from less than given amount of bytes
.br
minrecv (uint, default: 20):   redownload full file in HTTP repair if received bytes is less than given percentage of file size
.br

.br
.SH rtpout
.LP
.br
Description: RTP Streamer
.br

.br
The RTP streamer handles SDP/RTP output streaming.
.br
.SH SDP mode
.LP
.br
When the destination URL is an SDP, the filter outputs an SDP on a file PID and streams RTP packets over UDP, starting from the indicated .I port.
.br
.SH Direct RTP mode
.LP
.br
When the destination URL uses the protocol scheme rtp://IP:PORT, the filter does not output any SDP and streams a single input over RTP, using PORT indicated in the destination URL, or the first .I port configured.
.br
In this mode, it is usually needed to specify the desired format using .I ext or .I mime.
.br
Example
.br
gpac -i src -o rtp://localhost:1234/:ext=ts
.br

.br
This will indicate that the RTP streamer expects a MPEG-2 TS mux as an input.
.br
.SH RTP Packets
.LP
.br
The RTP packets produced have a maximum payload set by the .I mtu option (IP packet will be MTU + 40 bytes of IP+UDP+RTP headers).
.br
The real-time scheduling algorithm works as follows:
.br
- first initialize the clock by:
.br
  - computing the smallest timestamp for all input PIDs
.br
  - mapping this media time to the system clock
.br
- determine the earliest packet to send next on each input PID, adding .I delay if any
.br
- finally compare the packet mapped timestamp TS to the system clock SC. When TS - SC is less than .I tt, the RTP packets for the source packet are sent
.br

.br
The filter does not check for RTCP timeout and will run until all input PIDs reach end of stream.
.br

.br
.SH Options (expert):
.LP
.br
ip (str):                      destination IP address (NULL is 127.0.0.1)
.br
port (uint, default: 7000):    port for first stream in session
.br
loop (bool, default: false):   loop all streams in session (not always possible depending on source type)
.br
mpeg4 (bool, default: false):  send all streams using MPEG-4 generic payload format if possible
.br
mtu (uint, default: 1460):     size of RTP MTU in bytes
.br
ttl (uint, default: 2):        time-to-live for multicast packets
.br
ifce (str):                    default network interface to use
.br
payt (uint, default: 96, minmax: 96-127): payload type to use for dynamic decoder configurations
.br
delay (sint, default: 0):      send delay for packet (negative means send earlier)
.br
tt (uint, default: 1000):      time tolerance in microseconds. Whenever schedule time minus realtime is below this value, the packet is sent right away
.br
runfor (sint, default: -1):    run for the given time in ms. Negative value means run for ever (if loop) or source duration, 0 only outputs the sdp
.br
tso (sint, default: -1):       set timestamp offset in microseconds. Negative value means random initial timestamp
.br
xps (bool, default: false):    force parameter set injection at each SAP. If not set, only inject if different from SDP ones
.br
latm (bool, default: false):   use latm for AAC payload format
.br
dst (cstr):                    URL for direct RTP mode
.br
ext (str):                     file extension for direct RTP mode
.br
mime (cstr):                   set mime type for direct RTP mode
.br
speed (dbl, default: 1.0):     set streaming speed. If negative and start is 0, start is set to -1
.br
start (dbl, default: 0.0):     set streaming start offset. A negative value means percent of media duration with -1 equal to duration
.br

.br
.SH rtspout
.LP
.br
Description: RTSP server
.br

.br
The RTSP server partially implements RTSP 1.0, with support for OPTIONS, DESCRIBE, SETUP, PLAY, PAUSE and TEARDOWN.
.br
Multiple PLAY ranges are not supported, PLAY range end is not supported, PAUSE range is not supported.
.br
Only aggregated control is supported for PLAY and PAUSE, PAUSE/PLAY on single stream is not supported.
.br
The server only runs on TCP, and handles request in sequence: it will not probe for commands until previous response is sent.
.br
The server supports both RTP over UDP delivery and RTP interleaved over RTSP delivery.
.br

.br
The scheduling algorithm and RTP options are the same as the RTP output filter, see gpac -h rtpout
.br
The server will disconnect UDP streaming sessions if no RTCP traffic has been received for .I timeout seconds.
.br

.br
The server can run over TLS by specifying .I cert and .I pkey, in which case the default .I port is 322.
.br

.br
.SH Sink mode
.LP
.br
The filter can work as a simple output filter by specifying the .I dst option:
.br
.br
gpac -i source -o rtsp://myip/sessionname
.br
gpac -i source -o rtsp://myip/sessionname
.br

.br
In this mode, only one session is possible. It is possible to .I loop the input source(s).
.br

.br
.SH Server mode
.LP
.br
The filter can work as a regular RTSP server by specifying the .I mounts option to indicate paths of media file to be served:
.br
.br
gpac rtspout:mounts=mydir1,mydir2
.br

.br
In this case, content RES from any of the specified directory is exposed as rtsp://SERVER/RES
.br

.br
The .I mounts option can also specify access rule file(s), see gpac -h creds. When rules are used:
.br
- if a directory has a name rule, it will be used in the URL
.br
- otherwise, the directory is directly available under server root /
.br
- only read access and multicast rights are checked
.br
Example
.br
[foodir]
.br
name=bar
.br

.br
Content RES of this directory is exposed as rtsp://SERVER/bar/RES.
.br
  
.br

.br
In this mode, it is possible to load any source supported by gpac by setting the option .I dynurl.
.br
The expected syntax of the dynamic RTSP URLs is rtsp://servername/?URL1[&URLN] or rtsp://servername/@URL1[@URLN] 
.br
Each URL can be absolute or local, in which case it is resolved against the mount point(s).
.br
Example
.br
gpac -i rtsp://localhost/?pipe://mynamepipe&myfile.mp4 [dst filters]
.br

.br
The server will resolve this URL in a new session containing streams from myfile.mp4 and streams from pipe mynamepipe.
.br
When setting .I runfor in server mode, the server will exit at the end of the last session being closed.
.br

.br
The parameter name=VAL is reserved to assign a session name in case multicast mirroring is used.
.br
Example
.br
gpac -i rtsp://localhost/?name=live?pipe://mynamepipe&myfile.mp4 [dst filters]
.br

.br

.br
Usage of dynamic URLs can also be configured using the specific directory $dynurl in an access rule file.
.br
EX[$dynurl]
.br
ru=foo
.br
This will allow dynamic URLs only for foo user.
.br

.br
Note: If the .I dynurl is set, it is enabled for all users, without authentication.
.br

.br
.SH Multicasting
.LP
.br
In both modes, clients can setup multicast if the .I mcast option is on or mirror.
.br
When .I mcast is set to mirror mode, any DESCRIBE command on a resource already delivered through a multicast session will use that multicast.
.br
Consequently, only DESCRIBE methods are processed for such sessions, other methods will return Unauthorized.
.br

.br
In server mode, multicast can be enabled per read directory using the mcast access rule of the directory configuration - see gpac -h creds.
.br

.br
.SH HTTP Tunnel
.LP
.br
The server mode supports handling RTSP over HTTP tunnel by default. This can be disabled using .I htun.
.br
The tunnel conforms to QT specification, and only HTTP 1.0 and 1.1 tunnels are supported.
.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    location of destination resource
.br
port (uint, default: 554):     server port
.br
firstport (uint, default: 6000): port for first stream in session
.br
mtu (uint, default: 1460):     size of RTP MTU in bytes
.br
ttl (uint, default: 0):        time-to-live for multicast packets (a value of 0 uses client requested TTL, or 1)
.br
ifce (str):                    default network interface to use
.br
payt (uint, default: 96, minmax: 96-127): payload type to use for dynamic decoder configurations
.br
mpeg4 (bool, default: false):  send all streams using MPEG-4 generic payload format if possible
.br
delay (sint, default: 0):      send delay for packet (negative means send earlier)
.br
tt (uint, default: 1000):      time tolerance in microsecond (whenever schedule time minus realtime is below this value, the packet is sent right away)
.br
runfor (sint, default: -1):    run the session for the given time in ms. A negative value means run for ever if loop or source duration, value 0 only outputs the sdp
.br
tso (sint, default: -1):       set timestamp offset in microseconds (negative value means random initial timestamp)
.br
xps (bool, default: false):    force parameter set injection at each SAP. If not set, only inject if different from SDP ones
.br
latm (bool, default: false):   use latm for AAC payload format
.br
mounts (strl):                 list of directories to expose in server mode
.br
block_size (uint, default: 10000): block size used to read TCP socket
.br
maxc (uint, default: 100):     maximum number of connections
.br
timeout (uint, default: 20):   timeout in seconds for inactive sessions (0 disable timeout)
.br
user_agent (str, default: $GUA): user agent string, by default solved from GPAC preferences
.br
close (bool, default: false):  close RTSP connection after each request, except when RTP over RTSP is used
.br
loop (bool, default: false):   loop all streams in session (not always possible depending on source type)
.br
dynurl (bool, default: false): allow dynamic service assembly
.br
mcast (enum, default: off):    control multicast setup of a session
.br
* off: clients are never allowed to create a multicast
.br
* on: clients can create multicast sessions
.br
* mirror: clients can create a multicast session. Any later request to the same URL will use that multicast session
.br

.br
quit (bool, default: false):   exit server once first session is over (for test purposes)
.br
htun (bool, default: true):    enable RTSP over HTTP tunnel
.br
trp (enum, default: both):     transport mode
.br
* both: allow TCP or UDP traffic
.br
* udp: only allow UDP traffic
.br
* tcp: only allow TCP traffic
.br

.br
cert (str):                    certificate file in PEM format to use for TLS mode
.br
pkey (str):                    private key file in PEM format to use for TLS mode
.br

.br
.SH httpout
.LP
.br
Description: HTTP server
.br

.br
The HTTP output filter can act as:
.br
- a simple HTTP server
.br
- an HTTP server sink
.br
- an HTTP server file sink
.br
- an HTTP client sink
.br
- an HTTP server source
.br
  
.br
The server currently handles GET, HEAD, PUT, POST, DELETE methods, and basic OPTIONS support.
.br
Single or multiple byte ranges are supported for both GET and PUT/POST methods, in all server modes.
.br
- for GET, the resulting body is a single-part body formed by the concatenated byte ranges as requested (no overlap checking).
.br
- for PUT/POST, the received data is pushed to the target file according to the byte ranges specified in the client request.
.br
  
.br
Warning: the partial PUT request is RFC2616 compliant but not compliant with RFC7230. PATCH method is not yet implemented in GPAC.
.br
  
.br
When a single read directory is specified, the server root / is the content of this directory.
.br
When multiple read directories are specified, the server root / contains the list of the mount points with their directory names.
.br
When a write directory is specified, the upload resource name identifies a file in this directory (the write directory name is not present in the URL).
.br
  
.br
Warning: files uploaded / created in the write directory are always created in non-atomic modes.
.br
  
.br
A directory rule file (cf gpac -h creds) can be specified in .I rdirs but NOT in .I wdir. When rules are used:
.br
- if a directory has a name rule, it will be used in the URL
.br
- otherwise, the directory is directly available under server root /
.br
- read and write access rights are checked
.br
Example
.br
[foodir]
.br
name=bar
.br

.br
Content RES of this directory is exposed as http://SERVER/bar/RES.
.br
  
.br
To authenticate services handled by bindings, use a non-existing directory and a name describing the authentication.
.br
Example
.br
[NonExistingDir]
.br
name=service_root
.br

.br
Requests in the form http://SERVER/service_root/* will be authenticated by this rule.
.br
  
.br
Listing can be enabled on server using .I dlist.
.br
When disabled, a GET on a directory will fail.
.br
When enabled, a GET on a directory will return a simple HTML listing of the content inspired from Apache.
.br
  
.br
Custom headers can be specified using .I hdrs, they apply to all requests. For more advanced control on requests, use a javascript binding (see .I js and howtos).
.br
  
.br
Text files are compressed using gzip or deflate if the client accepts these encodings, unless .I zmax is set to 0.
.br
  
.br
.SH Simple HTTP server
.LP
.br
In this mode, the filter does not need any input connection and exposes all files in the directories given by .I rdirs.
.br
PUT and POST methods are only supported if a write directory is specified by .I wdir option.
.br
Example
.br
gpac httpout:rdirs=outcoming
.br

.br
This sets up a read-only server.
.br
  
.br
Example
.br
gpac httpout:wdir=incoming
.br

.br
This sets up a write-only server.
.br
  
.br
Example
.br
gpac httpout:rdirs=outcoming:wdir=incoming:port=8080
.br

.br
This sets up a read-write server running on .I port 8080.
.br
  
.br
.SH HTTP server sink
.LP
.br
In this mode, the filter will forward input PIDs to connected clients, trashing the data if no client is connected unless .I hold is specified.
.br
The filter does not use any read directory in this mode.
.br
This mode is mostly useful to setup live HTTP streaming of media sessions such as MP3, MPEG-2 TS or other multiplexed representations:
.br
.br
gpac -i MP3_SOURCE -o http://localhost/live.mp3 --hold
.br

.br
In this example, the server waits for client requests on /live.mp3 and will then push each input packet to all connected clients.
.br
If the source is not real-time, you can inject a reframer filter performing realtime regulation.
.br
Example
.br
gpac -i MP3_SOURCE reframer:rt=on -o http://localhost/live.mp3
.br

.br
In this example, the server will push each input packet to all connected clients, or trash the packet if no connected clients.
.br
  
.br
In this mode, ICECast meta-data can be inserted using .I ice. The default inserted values are ice-audio-info, icy-br, icy-pub (set to 1) and icy-name if input ServiceName property is set.
.br
The server will also look for any property called ice-* on the input PID and inject them.
.br
Example
.br
gpac -i source.mp3:#ice-Genre=CoolRock -o http://IP/live.mp3 --ice
.br

.br
This will inject the header ice-Genre: CoolRock in the response.  
.br
Once one complete input file is sent, it is no longer available for download unless .I reopen is set and input PID is not over.
.br
  
.br
This mode should not be used with multiple files muxers such as DASH or HLS.
.br
  
.br
.SH HTTP server file sink
.LP
.br
In this mode, the filter will write input PIDs to files in the first read directory specified, acting as a file output sink.
.br
The filter uses a read directory in this mode, which must be writable.
.br
Upon client GET request, the server will check if the requested URL matches the name of a file currently being written by the server.
.br
- If so, the server will:
.br
  - send the content using HTTP chunk transfer mode, starting with what is already written on disk
.br
  - push remaining data to the client as soon as received while writing it to disk, until source file is done
.br
- If not so, the server will simply send the file from the disk as a regular HTTP session, without chunk transfer.
.br
  
.br
This mode is typically used for origin server in HAS sessions where clients may request files while they are being produced (low latency DASH).
.br
Example
.br
gpac -i SOURCE reframer:rt=on -o http://localhost:8080/live.mpd --rdirs=temp --dmode=dynamic --cdur=0.1
.br

.br
In this example, a real-time dynamic DASH session with chunks of 100ms is created, writing files to temp. A client connecting to the live edge will receive segments as they are produced using HTTP chunk transfer.
.br
  
.br
The server can store incoming files to memory mode by setting the read directory to gmem.
.br
In this mode, .I max_cache_segs is always at least 1.
.br
  
.br
If .I max_cache_segs value N is not 0, each incoming PID will store at most:
.br
- MIN(N, time-shift depth) files if stored in memory
.br
- -N files if stored locally and N is negative
.br
- MAX(N, time-shift depth) files if stored locally and N is positive
.br
- unlimited otherwise (files stored locally, N is positive and no time-shift info)
.br
  
.br
.SH HTTP client sink
.LP
.br
In this mode, the filter will upload input PIDs data to remote server using PUT (or POST if .I post is set).
.br
This mode must be explicitly activated using .I hmode.
.br
The filter uses no read or write directories in this mode.
.br
Example
.br
gpac -i SOURCE -o http://targethost:8080/live.mpd:gpac:hmode=push
.br

.br
In this example, the filter will send PUT methods to the server running on .I port 8080 at targethost location (IP address or name).
.br
  
.br
.SH HTTP server source
.LP
.br
In this mode, the server acts as a source rather than a sink. It declares incoming PUT or POST methods as output PIDs
.br
This mode must be explicitly activated using .I hmode.
.br
The filter uses no read or write directories in this mode, and uploaded data is NOT stored by the server.
.br
Example
.br
gpac httpout:hmode=source vout aout
.br

.br
In this example, the filter will try to play uploaded files through video and audio output.
.br
  
.br
.SH HTTPS server
.LP
.br
The server can run over TLS (https) for all the server modes. TLS is enabled by specifying .I cert and .I pkey options.
.br
Both certificate and key must be in PEM format.
.br
The server currently only operates in either HTTPS or HTTP mode and cannot run both modes at the same time. You will need to use two httpout filters for this, one operating in HTTPS and one operating in HTTP.
.br
  
.br
.SH Multiple destinations on single server
.LP
.br
When running in server mode, multiple HTTP outputs with same URL/port may be used:
.br
- the first loaded HTTP output filter with same URL/port will be reused
.br
- all httpout options of subsequent httpout filters, except .I dst will be ignored, other options will be inherited as usual
.br

.br
Example
.br
gpac -i dash.mpd dashin:forward=file:FID=D1 dashin:forward=segb:FID=D2 -o http://localhost:80/live.mpd:SID=D1:rdirs=dash -o http://localhost:80/live_rw.mpd:SID=D2:sigfrag
.br

.br
This will:
.br
- load the HTTP server and forward (through D1) the dash session to this server using live.mpd as manifest name
.br
- reuse the HTTP server and regenerate the manifest (through D2 and sigfrag option), using live_rw.mpd as manifest name
.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    location of destination resource
.br
port (uintl, default: 0):      server port
.br
ifce (str):                    default network interface to use
.br
rdirs (strl):                  list of directories to expose for read
.br
wdir (str):                    directory to expose for write
.br
cert (str):                    certificate file in PEM format to use for TLS mode
.br
pkey (str):                    private key file in PEM format to use for TLS mode
.br
block_size (uint, default: 10000): block size used to read and write TCP socket
.br
user_agent (str, default: $GUA): user agent string, by default solved from GPAC preferences
.br
close (bool, default: false):  close HTTP connection after each request
.br
maxc (uint, default: 100):     maximum number of connections, 0 is unlimited
.br
maxp (uint, default: 6):       maximum number of connections for one peer (0 is unlimited)
.br
cache_control (str):           specify the Cache-Control string to add (none disable cache control and ETag)
.br
hold (bool, default: false):   hold packets until one client connects
.br
hmode (enum, default: default): filter operation mode, ignored if .I wdir is set
.br
* default: run in server mode
.br
* push: run in client mode using PUT or POST
.br
* source: use server as source filter on incoming PUT/POST
.br

.br
timeout (uint, default: 30):   timeout in seconds for persistent connections (0 disable timeout)
.br
ext (cstr):                    set extension for graph resolution, regardless of file extension
.br
mime (cstr):                   set mime type for graph resolution
.br
quit (bool, default: false):   exit server once all input PIDs are done and client disconnects (for test purposes)
.br
post (bool, default: false):   use POST instead of PUT for uploading files
.br
dlist (bool, default: false):  enable HTML listing for GET requests on directories
.br
sutc (bool, default: false):   insert server UTC in response headers as Server-UTC: VAL_IN_MS
.br
cors (enum, default: auto):    insert CORS header allowing all domains
.br
* off: disable CORS
.br
* on: enable CORS
.br
* auto: enable CORS when Origin is found in request
.br

.br
reqlog (str):                  provide short log of the requests indicated in this option (comma separated list, * for all) regardless of HTTP log settings. Value REC logs file writing start/end. If prefix - is set, do not log request end
.br
ice (bool, default: false):    insert ICE meta-data in response headers in sink mode
.br
max_client_errors (uint, default: 20): force disconnection after specified number of consecutive errors from HTTTP 1.1 client (ignored in H/2 or when close is set)
.br
max_cache_segs (sint, default: 5): maximum number of segments cached per HAS quality (see filter help)
.br
reopen (bool, default: false): in server mode with no read dir, accept requests on files already over but with input pid not in end of stream
.br
max_async_buf (uint, default: 100000): maximum async buffer size in bytes when sharing output over multiple connection without file IO
.br
blockio (bool, default: false): use blocking IO in push or source mode or in server mode with no read dir
.br
ka (bool, default: true):      keep input alive if failure in push mode
.br
hdrs (strl):                   additional HTTP headers to inject, even values are names, odd values are values 
.br
js (str):                      javascript logic for server
.br
zmax (uint, default: 50000):   maximum uncompressed size allowed for gzip or deflate compression for text files (only enabled if client indicates it), 0 will disable compression
.br
cte (bool, default: true):     use chunked transfer-encoding mode when possible
.br
maxs (uint, default: 50M):     maximum upload size allowed in bytes
.br
norange (bool, default: false): disable byte range support in GET (reply 200 on partial requests)
.br

.br
.SH hevcsplit
.LP
.br
Description: HEVC Tile extractor
.br

.br
This filter splits a motion-constrained tiled HEVC PID into N independent HEVC PIDs.
.br
Use hevcmerge filter to merge initially motion-constrained tiled HEVC PID in a single output.
.br

.br
No options
.br

.br
.SH hevcmerge
.LP
.br
Description: HEVC Tile merger
.br

.br
This filter merges a set of HEVC PIDs into a single motion-constrained tiled HEVC PID.
.br
The filter creates a tiling grid with a single row and as many columns as needed.
.br
If .I mrows is set and tiles properly align on the final grid, multiple rows will be declared in the PPS.
.br
Positioning of tiles can be automatic (implicit) or explicit.
.br
The filter will check the SPS and PPS configurations of input PID and warn if they are not aligned but will still process them unless .I strict is set.
.br
The filter assumes that all input PIDs are synchronized (frames share the same timestamp) and will reassemble frames with the same decode time. If PIDs are of unequal duration, the filter will drop frames as soon as one PID is over.
.br
.SS Implicit Positioning
.br
In implicit positioning, results may vary based on the order of input PIDs declaration.
.br
In this mode the filter will automatically allocate new columns for tiles with height not a multiple of max CU height.
.br
.SS Explicit Positioning
.br
In explicit positioning, the CropOrigin property on input PIDs is used to setup the tile grid. In this case, tiles shall not overlap in the final output.
.br
If CropOrigin is used, it shall be set on all input sources.
.br
If positive coordinates are used, they specify absolute positioning in pixels of the tiles. The coordinates are automatically adjusted to the next multiple of max CU width and height.
.br
If negative coordinates are used, they specify relative positioning (e.g. 0x-1 indicates to place the tile below the tile 0x0).
.br
In this mode, it is the caller responsibility to set coordinates so that all tiles in a column have the same width and only the last row/column uses non-multiple of max CU width/height values. The filter will complain and abort if this is not respected.
.br
- If an horizontal blank is detected in the layout, an empty column in the tiling grid will be inserted.
.br
- If a vertical blank is detected in the layout, it is ignored.
.br
  
.br
.SS Spatial Relationship Description (SRD)
.br

.br
The filter will create an SRDMap property in the output PID if SRDRef and SRD or CropOrigin are set on all input PIDs.
.br
The SRDMap allows forwarding the logical sources SRD in the merged PID.
.br
The output PID SRDRef is set to the output video size.
.br
The input SRDRef and SRD are usually specified in DASH MPD, but can be manually assigned to inputs.
.br
- SRDRef gives the size of the referential used for the input SRD (usually matches the original video size, but not always)
.br
- SRD gives the size and position of the input in the original video, expressed in SRDRef referential of the input.
.br
The inputs do not need to have matching SRDRef
.EX src1:SRD=0x0x640x480:SRDRef=1280x720
.br
This indicates that src1 contains a video located at 0,0, with a size of 640x480 pixels in a virtual source of 1280x720 pixels.
.br
Example
.br
src2:SRD=640x0x640x480:SRDRef=1280x720
.br

.br
This indicates that src1 contains a video located at 640,0, with a size of 640x480 pixels in a virtual source of 1280x720 pixels.
.br
 
.br
Each merged input is described by 8 integers in the output SRDMap:
.br
- the source SRD is rescaled in the output SRDRef to form the first part (4 integers) of the SRDMap (i.e. where was the input ?)
.br
- the source location in the reconstructed video forms the second part (4 integers) of the SRDMap (i.e. where are the input pixels in the output ?)
.br
 
.br
Assuming the two sources are encoded at 320x240 and merged as src2 above src1, the output will be a 320x480 video with a SRDMap of {0,160,160,240,0,0,320,240,0,0,160,240,0,240,320,240}
.br
Note: merged inputs are always listed in SRDMap in their tile order in the output bitstream.
.br

.br
Alternatively to using SRD and SRDRef, it is possible to specify CropOrigin property on the inputs, in which case:
.br
- the CropOrigin gives the location in the source
.br
- the input size gives the size in the source, and no rescaling of referential is done
.br
Example
.br
src1:CropOrigin=0x0  src1:CropOrigin=640x0 
.br

.br
Assuming the two sources are encoded at 320x240 and merged as src1 above src2, the output will be a 320x480 video with a SRDMap of {0,0,320,240,0,0,320,240,640,0,320,240,0,240,320,240}
.br

.br
.SH Options (expert):
.LP
.br
strict (bool, default: false): strict comparison of SPS and PPS of input PIDs
.br
mrows (bool, default: false):  signal multiple rows in tile grid when possible
.br

.br
.SH rfflac
.LP
.br
Description: FLAC reframer
.br

.br
This filter parses FLAC files/data and outputs corresponding audio PID and frames.
.br

.br
By default the reframer will only check CRC footer of frames if a change in sample rate or channel mapping is detected.
.br
This should accommodate for most configurations, but CRC check can be enforced using .I docrc.
.br

.br
.SH Options (expert):
.LP
.br
index (dbl, default: 1.0):     indexing window length
.br
docrc (bool, default: false):  perform CRC check after each frame
.br

.br
.SH rfmhas
.LP
.br
Description: MPEH-H Audio Stream reframer
.br

.br
This filter parses MHAS files/data and outputs corresponding audio PID and frames.
.br
By default, the filter expects a MHAS stream with SYNC packets set, otherwise tune-in will fail. Using .I nosync=false can help parsing bitstreams with no SYNC packets.
.br
The default behavior is to dispatch a framed MHAS bitstream. To demultiplex into a raw MPEG-H Audio, use .I mpha.
.br

.br
.SH Options (expert):
.LP
.br
index (dbl, default: 1.0):     indexing window length
.br
mpha (bool, default: false):   demultiplex MHAS and only forward audio frames
.br
pcksync (uint, default: 4):    number of unknown packets to tolerate before considering sync is lost
.br
nosync (bool, default: true):  initial sync state
.br

.br
.SH rfprores
.LP
.br
Description: ProRes reframer
.br

.br
This filter parses ProRes raw files/data and outputs corresponding visual PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
fps (frac, default: 0/1000):   import frame rate (0 default to FPS from bitstream or 25 Hz)
.br
findex (bool, default: true):  index frames. If true, filter will be able to work in rewind mode
.br
cid (str):                     set QT 4CC for the imported media. If not set, default is 'ap4h' for YUV444 and 'apch' for YUV422
.br
notime (bool, default: false): ignore input timestamps, rebuild from 0
.br

.br
.SH tssplit
.LP
.br
Description: MPEG-2 TS splitter
.br

.br
This filter splits an MPEG-2 transport stream into several single program transport streams.
.br
Only the PAT table is rewritten, other tables (PAT, PMT) and streams (PES) are forwarded as is.
.br
If .I dvb is set, global DVB tables of the input multiplex are forwarded to each output mux; otherwise these tables are discarded.
.br

.br
.SH Options (expert):
.LP
.br
dvb (bool, default: true):     forward all packets from global DVB PIDs
.br
mux_id (sint, default: -1):    set initial ID of output mux; the first program will use mux_id, the second mux_id+1, etc. If not set, this value will be set to sourceMuxId*255
.br
avonly (bool, default: true):  do not forward programs with no AV component
.br
nb_pack (uint, default: 10):   pack N packets before sending
.br
gendts (bool, default: false): generate timestamps on output packets based on PCR
.br
kpad (bool, default: false):   keep padding (null) TS packets
.br
rt (bool, default: false):     enable real-time regulation
.br

.br
.SH tsgendts
.LP
.br
Description: MPEG-2 TS timestamper
.br

.br
This filter restamps input MPEG-2 transport stream based on PCR.
.br

.br
.SH Options (expert):
.LP
.br
nb_pack (uint, default: 10):   pack N packets before sending
.br
kpad (bool, default: false):   keep padding (null) TS packets
.br
rt (bool, default: false):     enable real-time regulation
.br

.br
.SH bsrw
.LP
.br
Description: Bitstream metadata rewriter
.br

.br
This filter rewrites some metadata of various bitstream formats.
.br
The filter can currently modify the following properties in video bitstreams:
.br
- MPEG-4 Visual:
.br
  - sample aspect ratio
.br
  - profile and level
.br
- AVC|H264, HEVC and VVC:
.br
  - sample aspect ratio
.br
  - profile, level, profile compatibility
.br
  - video format, video fullrange
.br
  - color primaries, transfer characteristics and matrix coefficients (or remove all info)
.br
  - (AVC|HEVC) timecode- AV1:
.br
  - timecode
.br
- ProRes:
.br
  - sample aspect ratio
.br
  - color primaries, transfer characteristics and matrix coefficients
.br
  
.br
Values are by default initialized to -1, implying to keep the related info (present or not) in the bitstream.
.br
A .I sar value of 0/0 will remove sample aspect ratio info from bitstream if possible.
.br
  
.br
The filter can currently modify the following properties in the stream configuration but not in the bitstream:
.br
* HEVC: profile IDC, profile space, general compatibility flags
.br
* VVC: profile IDC, general profile and level indication
.br
  
.br
The filter will work in passthrough mode for all other codecs and media types.
.br
.SH Timecode Manipulation
.LP
.br
One can optionally set the .I tcxs and .I tcxe to define the start and end of timecode manipulation. By default, the filter will process all packets.
.br
Some modes require you to define .I tcsc. This follows the same format as the timecode itself (.I -. The use of negative values is only meaningful in the shift mode. It's also possible to set .I tcsc to first to infer the value from the first timecode when timecode manipulation starts. In this case, unless a timecode is found, the filter will not perform any operation.
.br
.SS Modes
.br
Timecode manipulation has four modes and they all have their own operating nuances.
.br
.P
.B
Remove
.br
Remove all timecodes from the bitstream.
.br
.P
.B
Insert
.br
Insert timecodes based on the CTS. If .I tcsc is set, it will be used as timecode offset.
.br
This mode will overwrite existing timecodes (if any).
.br
.P
.B
Shift
.br
Shift all timecodes by the value defined in .I tcsc.
.br
This mode will only modify timecodes if they exists, no new timecode will be inserted.
.br
.P
.B
Constant
.br
Set all timecodes to the value defined in .I tcsc.
.br
Again, this mode wouldn't insert new timecodes.
.br
.P
.B
UTC
.br
Uses the SenderNTP property, UTC property on the packet, or the current UTC time to set the timecode.
.br
This mode will overwrite existing timecodes (if any).
.br
.SS Examples
.br
Example
.br
gpac -i in.mp4 bsrw:tc=insert [dst]
.br
gpac -i in.mp4 bsrw:tc=insert:tcsc=TC00:00:10:00 [dst]
.br
gpac -i in.mp4 bsrw:tc=shift:tcsc=TC00:00:10:00:tcxs=TC00:01:00:00 [dst]
.br

.br

.br
.SH Options (expert):
.LP
.br
cprim (cprm, default: -1, Enum: reserved0|BT709|undef|reserved3|BT470M|BT470G|SMPTE170|SMPTE240|FILM|BT2020|SMPTE428|SMPTE431|SMPTE432|EBU3213, updatable): color primaries according to ISO/IEC 23001-8 / 23091-2
.br

.br
ctfc (ctfc, default: -1, Enum: reserved0|BT709|undef|reserved3|BT470M|BT470BG|SMPTE170|SMPTE249|Linear|Log100|Log316|IEC61966|BT1361|sRGB|BT2020_10|BT2020_12|SMPTE2084|SMPTE428|STDB67, updatable): color transfer characteristics according to ISO/IEC 23001-8 / 23091-2
.br

.br
cmx (cmxc, default: -1, Enum: GBR|BT709|undef|FCC|BT601|SMPTE170|SMPTE240|YCgCo|BT2020|BT2020cl|YDzDx, updatable): color matrix coefficients according to ISO/IEC 23001-8 / 23091-2
.br

.br
sar (frac, default: -1/-1, updatable): aspect ratio to rewrite
.br
m4vpl (sint, default: -1, updatable): set ProfileLevel for MPEG-4 video part two
.br
fullrange (bool, default: false, updatable): video full range flag
.br
novsi (bool, default: false, updatable): remove video_signal_type from VUI in AVC|H264 and HEVC
.br
novuitiming (bool, default: false, updatable): remove timing_info from VUI in AVC|H264 and HEVC
.br
prof (sint, default: -1, updatable): profile indication for AVC|H264
.br
lev (sint, default: -1, updatable): level indication for AVC|H264, level_idc for VVC
.br
pcomp (sint, default: -1, updatable): profile compatibility for AVC|H264
.br
pidc (sint, default: -1, updatable): profile IDC for HEVC and VVC
.br
pspace (sint, default: -1, updatable): profile space for HEVC
.br
gpcflags (sint, default: -1, updatable): general compatibility flags for HEVC
.br
tcxs (str, updatable):         timecode manipulation start
.br
tcxe (str, updatable):         timecode manipulation end
.br
tcdf (bool, default: false, updatable): use NTSC drop-frame counting for timecodes
.br
tcsc (str, updatable):         timecode constant for use with shift/constant modes
.br
tc (enum, default: none, updatable): timecode manipulation mode
.br
* none: do not change anything
.br
* remove: remove timecodes
.br
* insert: insert timecodes based on cts or tcsc (if provided)
.br
* shift: shift timecodes based by tcsc
.br
* constant: overwrite timecodes with tcsc
.br
* utc: insert timecodes based on the utc time on the packet or the current time
.br

.br
seis (uintl, updatable):       list of SEI message types (4,137,144,...). When used with rmsei, this serves as a blacklist. If left empty, all SEIs will be removed. Otherwise, it serves as a whitelist
.br
rmsei (bool, default: false, updatable): remove SEI messages from bitstream for AVC|H264, HEVC and VVC
.br
vidfmt (sint, default: -1, Enum: component|pal|ntsc|secam|mac|undef, updatable): video format for AVC|H264, HEVC and VVC
.br

.br

.br
.SH bssplit
.LP
.br
Description: Layered bitstream splitter
.br

.br
This filter splits input stream by layers and sublayers
.br

.br
The filter supports AVC|H264, HEVC and VVC stream splitting and is pass-through for other codec types.
.br

.br
Splitting is based on temporalID value (start from 1) and layerID value (start from 0).
.br
For AVC|H264, layerID is the dependency value, or quality value if svcqid is set.
.br

.br
Each input stream is filtered according to the ltid option as follows:
.br
* no value set: input stream is split by layerID, i.e. each layer creates an output
.br
* `all`: input stream is split by layerID and temporalID, i.e. each {layerID,temporalID} creates an output
.br
* `lID`: input stream is split according to layer lID value, and temporalID is ignored
.br
* `.tID`: input stream is split according to temporal sub-layer tID value and layerID is ignored
.br
* `lID.tID`: input stream is split according to layer lID and sub-layer tID values
.br

.br
Note: A tID value of 0 in ltid is equivalent to value 1.
.br

.br
Multiple values can be given in ltid, in which case each value gives the maximum {layerID,temporalID} values for the current layer.
.br
A few examples on an input with 2 layers each with 2 temporal sublayers:
.br
* `ltid=0.2`: this will split the stream in:
.br
  - one stream with {lID=0,tID=1} and {lID=0,tID=2} NAL units
.br
  - one stream with all other layers/substreams
.br
* `ltid=0.1,1.1`: this will split the stream in:
.br
  - one stream with {lID=0,tID=1} NAL units
.br
  - one stream with {lID=0,tID=2}, {lID=1,tID=1} NAL units
.br
  - one stream with the rest {lID=0,tID=2}, {lID=1,tID=2} NAL units
.br
* `ltid=0.1,0.2`: this will split the stream in:
.br
  - one stream with {lID=0,tID=1} NAL units
.br
  - one stream with {lID=0,tID=2} NAL units
.br
  - one stream with the rest {lID=1,tID=1}, {lID=1,tID=2} NAL units
.br

.br
The filter can also be used on AVC and HEVC DolbyVision streams to split base stream and DV RPU/EL.
.br

.br
The filter does not create aggregator or extractor NAL units.
.br

.br
.SH Options (expert):
.LP
.br
ltid (strl):                   temporal and layer ID of output streams
.br
svcqid (bool, default: false): use qualityID instead of dependencyID for SVC splitting
.br
sig_ltid (bool, default: false): signal maximum temporal (max_temporal_id) and layer ID (max_layer_id) of output streams (mostly used for debug)
.br

.br
.SH bsagg
.LP
.br
Description: Layered bitstream aggregator
.br

.br
This filter aggregates layers and sublayers into a single output PID.
.br

.br
The filter supports AVC|H264, HEVC and VVC stream reconstruction, and is passthrough for other codec types.
.br

.br
Aggregation is based on temporalID value (start from 1) and layerID value (start from 0).
.br
For AVC|H264, layerID is the dependency value, or quality value if svcqid is set.
.br

.br
The filter can also be used on AVC and HEVC DolbyVision dual-streams to aggregate base stream and DV RPU/EL.
.br

.br
The filter does not forward aggregator or extractor NAL units.
.br

.br
.SH Options (expert):
.LP
.br
svcqid (bool, default: false): use qualityID instead of dependencyID for SVC splitting
.br

.br
.SH ufttxt
.LP
.br
Description: TX3G rewriter
.br

.br
This filter converts a single ISOBMFF TX3G stream to TTXT (xml format) unframed stream.
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br

.br
.SH tx3g2srt
.LP
.br
Description: TX3G to SRT
.br

.br
This filter converts a single ISOBMFF TX3G stream to an SRT unframed stream.
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br

.br
.SH tx3g2vtt
.LP
.br
Description: TX3G to WebVTT
.br

.br
This filter converts a single ISOBMFF TX3G stream to a WebVTT unframed stream.
.br

.br
.SH Options (expert):
.LP
.br
exporter (bool, default: false): compatibility with old exporter, displays export results
.br

.br
.SH tx3g2ttml
.LP
.br
Description: TX3G to TTML
.br

.br
This filter converts ISOBMFF TX3G stream to a TTML stream.
.br

.br
Each output TTML frame is a complete TTML document.
.br

.br
No options
.br

.br
.SH vtt2tx3g
.LP
.br
Description: WebVTT to TX3G
.br

.br
This filter rewrites unframed WebVTT to TX3G / QT Timed Text (binary format)
.br

.br
Unframed WebVTT packets consist in single cues:
.br
- cue payload as packet payload
.br
- prefix as packet string property vtt_pre
.br
- cue ID as packet string property vtt_cueid
.br
- cue settings as packet string property vtt_settings
.br
- packet timing contains the cue timing (start and duration)
.br

.br
.SH Options (expert):
.LP
.br
fontname (str):                default font
.br
fontsize (uint, default: 18):  default font size
.br

.br
.SH rfsrt
.LP
.br
Description: SRT reframer
.br

.br
This filter rewrites unframed SRT to TX3G / QT Timed Text (binary format)
.br

.br
An unframed SRT packet consists in a single SRT cue as packet payload and packet timing contains the cue timing (start and duration).
.br

.br
.SH Options (expert):
.LP
.br
fontname (str):                default font
.br
fontsize (uint, default: 18):  default font size
.br

.br
.SH ttml2vtt
.LP
.br
Description: TTML to WebVTT
.br

.br
This filter converts TTML frames to unframed WebVTT.
.br

.br
Conversion is quite limited: only the first div is analyzed and only basic styling is implemented.
.br

.br
No options
.br

.br
.SH ttml2srt
.LP
.br
Description: TTML to SRT
.br

.br
This filter converts TTML frames to unframed SRT.
.br

.br
Conversion is quite limited: only the first div is analyzed and only basic styling is implemented.
.br

.br
No options
.br

.br
.SH mpeghdec
.LP
.br
Description: MPEG-H Audio decoder
.br

.br
This filter decodes MPEG-H audio streams through IIS MpeghDecoder library.
.br

.br
.SH Options (expert):
.LP
.br
cicp_idx (uint, default: 2):   target output layout CICP index (see gpac -h layouts)
.br

.br
.SH ffdmx
.LP
.br
Description: FFmpeg demultiplexer
.br
Version: Lavf61.9.100
.br

.br
This filter demultiplexes an input file or open a source protocol using FFmpeg.
.br
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details.
.br
To list all supported demultiplexers for your GPAC build, use gpac -h ffdmx:*.
.br
This will list both supported input formats and protocols.
.br
Input protocols are listed with Description: Input protocol, and the subclass name identifies the protocol scheme.
.br
For example, if ffdmx:rtmp is listed as input protocol, this means rtmp:// source URLs are supported.
.br

.br
.SH Raw protocol mode
.LP
.br
The .I proto flag will disable FFmpeg demuxer and use GPAC instead. Default format is probed from initial data but can be set using .I ext or .I mime if probing is disabled.
.br
Example
.br
gpac -i srt://127.0.0.1:1234:gpac:proto inspectThis will use the SRT protocol handler but GPAC demultiplexer
.br

.br

.br
In this mode, the filter uses the time between the last two received packets to estimates how often it should check for inputs. The maximum and minimum times to wait between two calls is given by the .I mwait option. The maximum time may need to be reduced for very high bitrates sources.
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    URL of source content
.br
reparse (bool, default: false): force reparsing of stream content (AVC,HEVC,VVC,AV1 only for now)
.br
block_size (uint, default: 4096): block size used to read file when using GFIO context
.br
strbuf_min (uint, default: 1MB): internal buffer size when demuxing from GPAC's input stream
.br
proto (bool, default: false):  use protocol handler only and bypass FFmpeg demuxer
.br
mwait (v2di, default: 1x30):   set min and max wait times in ms to avoid too frequent polling in proto mode
.br
ext (str):                     indicate file extension of data in raw protocol mode
.br
mime (str):                    indicate mime type of data in raw protocol mode
.br
* (str):                       any possible options defined for AVFormatContext and sub-classes. See gpac -hx ffdmx and gpac -hx ffdmx:*
.br

.br
.SH ffdec
.LP
.br
Description: FFmpeg decoder
.br
Version: Lavc61.24.100
.br

.br
This filter decodes audio and video streams using FFmpeg.
.br
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details.
.br
To list all supported decoders for your GPAC build, use gpac -h ffdec:*.
.br

.br
Options can be passed from prompt using --OPT=VAL
.br
Decoder flags can be passed directly as :FLAGNAME.
.br
The default threading mode is to let libavcodec decide how many threads to use. To enforce single thread, use --threads=1
.br

.br
.SH Codec Map
.LP
.br
The .I ffcmap option allows specifying FFmpeg codecs for codecs not supported by GPAC.
.br
Each entry in the list is formatted as GID@name or GID@+name, with:
.br
* GID: 4CC or 32 bit identifier of codec ID, as indicated by gpac -i source inspect:full
.br
* name: FFmpeg codec name
.br
* `+': is set and extra data is set and formatted as an ISOBMFF box, removes box header
.br

.br
Example
.br
gpac -i source.mp4 --ffcmap=BKV1@binkvideo vout
.br

.br
This will map an ISOBMFF track declared with coding type BKV1 to binkvideo.
.br

.br
.SH Options (expert):
.LP
.br
ffcmap (strl):                 codec map
.br
c (str):                       codec name (GPAC or ffmpeg), only used to query possible arguments - updated to ffmpeg codec name after initialization
.br
* (str):                       any possible options defined for AVCodecContext and sub-classes. See gpac -hx ffdec and gpac -hx ffdec:*
.br

.br
.SH ffavin
.LP
.br
Description: FFmpeg AV capture
.br
Version: Lavd61.4.100
.br

.br
Reads from audio/video capture devices using FFmpeg.
.br
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details.
.br
To list all supported grabbers for your GPAC build, use gpac -h ffavin:*.
.br

.br
.SH Device identification
.LP
.br
Typical classes are dshow on windows, avfoundation on OSX, video4linux2 or x11grab on linux
.br

.br
Typical device name can be the webcam name:
.br
- FaceTime HD Camera on OSX, device name on windows, /dev/video0 on linux
.br
- screen-capture-recorder, see http://screencapturer.sf.net/ on windows
.br
- Capture screen 0 on OSX (0=first screen), or screenN for short
.br
- X display name (e.g. :0.0) on linux
.br

.br
The general mapping from ffmpeg command line is:
.br
- ffmpeg -f maps to .I fmt option
.br
- ffmpeg -i maps to .I dev option
.br

.br
Example
.br
ffmpeg -f libndi_newtek -i MY_NDI_TEST ...
.br
gpac -i av://:fmt=libndi_newtek:dev=MY_NDI_TEST ...
.br

.br

.br
You may need to escape the .I dev option if the format uses ':' as separator, as is the case for AVFoundation:
.br
.br
gpac -i av://::dev=0:1 ...
.br

.br

.br
.SH Options (expert):
.LP
.br
src (str):                     url of device, video://, audio:// or av://
.br
fmt (str):                     name of device class. If not set, defaults to first device class
.br
dev (str, default: 0):         name of device or index of device
.br
copy (enum, default: A):       set copy mode of raw frames
.br
* N: frames are only forwarded (shared memory, no copy)
.br
* A: audio frames are copied, video frames are forwarded
.br
* V: video frames are copied, audio frames are forwarded
.br
* AV: all frames are copied
.br

.br
sclock (bool, default: false): use system clock (us) instead of device timestamp (for buggy devices)
.br
probes (uint, default: 10, minmax: 0-100): probe a given number of video frames before emitting (this usually helps with bad timing of the first frames)
.br
* (str):                       any possible options defined for AVInputFormat and AVFormatContext (see gpac -hx ffavin and gpac -hx ffavin:*)
.br

.br
.SH ffsws
.LP
.br
Description: FFmpeg video rescaler
.br
Version: SwS8.9.101
.br

.br
This filter rescales raw video data using FFmpeg to the specified size and pixel format.
.br
.SS Output size assignment
.br
If .I osize is {0,0}, the output dimensions will be set to the input size, and input aspect ratio will be ignored.
.br

.br
If .I osize is {0,H} (resp. {W,0}), the output width (resp. height) will be set to respect input aspect ratio. If .I keepar = nosrc, input sample aspect ratio is ignored.
.br
.SS Aspect Ratio and Sample Aspect Ratio
.br
When output sample aspect ratio is set, the output dimensions are divided by the output sample aspect ratio.
.br
Example
.br
ffsws:osize=288x240:osar=3/2
.br

.br
The output dimensions will be 192x240.
.br

.br
When aspect ratio is not kept (.I keepar = off):
.br
- source is resampled to desired dimensions
.br
- if output aspect ratio is not set, output will use source sample aspect ratio
.br

.br
When aspect ratio is partially kept (.I keepar = nosrc):
.br
- resampling is done on the input data without taking input sample aspect ratio into account
.br
- if output sample aspect ratio is not set (.I osar = 0/N), source aspect ratio is forwarded to output.
.br

.br
When aspect ratio is fully kept (.I keepar = full), output aspect ratio is force to 1/1 if not set.
.br

.br
When sample aspect ratio is kept, the filter will:
.br
- center the rescaled input frame on the output frame
.br
- fill extra pixels with .I padclr
.br

.br
.SS Algorithms options
.br
- for bicubic, to tune the shape of the basis function, .I p1 tunes f(1) and .I p2 f´(1)
.br
- for gauss .I p1 tunes the exponent and thus cutoff frequency
.br
- for lanczos .I p1 tunes the width of the window function
.br

.br
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details
.br

.br
.SH Options (expert):
.LP
.br
osize (v2di):                  osize of output video
.br
ofmt (pfmt, default: none, Enum: none|yuv420|yvu420|yuv420_10|yuv422|yuv422_10|yuv444|yuv444_10|uyvy|vyuy|yuyv|yvyu|uyvl|vyul|yuyl|yvyl|nv12|nv21|nv1l|nv2l|yuva|yuvd|yuv444a|yuv444p|v308|yuv444ap|v408|v410|v210|grey|algr|gral|rgb4|rgb5|rgb6|rgba|argb|bgra|abgr|rgb|bgr|xrgb|rgbx|xbgr|bgrx|rgbd|rgbds|uncv): pixel format for output video. When not set, input format is used
.br

.br
scale (enum, default: bicubic): scaling mode (see filter help) (fastbilinear|bilinear|bicubic|X|point|area|bicublin|gauss|sinc|lanzcos|spline)
.br

.br
p1 (dbl, default: +I):         scaling algo param1
.br
p2 (dbl, default: +I):         scaling algo param2
.br
ofr (bool, default: false):    force output full range
.br
brightness (bool, default: 0): 16.16 fixed point brightness correction, 0 means use default
.br
contrast (uint, default: 0):   16.16 fixed point brightness correction, 0 means use default
.br
saturation (uint, default: 0): 16.16 fixed point brightness correction, 0 means use default
.br
otable (sintl):                the yuv2rgb coefficients describing the output yuv space, normally ff_yuv2rgb_coeffs[x], use default if not set
.br
itable (sintl):                the yuv2rgb coefficients describing the input yuv space, normally ff_yuv2rgb_coeffs[x], use default if not set
.br
keepar (enum, default: off):   keep aspect ratio
.br
* off: ignore aspect ratio
.br
* full: respect aspect ratio, applying input sample aspect ratio info
.br
* nosrc: respect aspect ratio but ignore input sample aspect ratio
.br

.br
padclr (str, default: black):  clear color when aspect ration preservation is used
.br
osar (frac, default: 0/1):     force output pixel aspect ratio
.br

.br
.SH ffenc
.LP
.br
Description: FFmpeg encoder
.br
Version: Lavc61.24.100
.br

.br
This filter encodes audio and video streams using FFmpeg.
.br
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details.
.br
To list all supported encoders for your GPAC build, use gpac -h ffenc:*.
.br

.br
The filter will try to resolve the codec name in .I c against a libavcodec codec name (e.g. libx264) and use it if found.
.br
If not found, it will consider the name to be a GPAC codec name and find a codec for it. In that case, if no pixel format is given, codecs will be enumerated to find a matching pixel format.
.br

.br
Options can be passed from prompt using --OPT=VAL (global options) or appending ::OPT=VAL to the desired encoder filter.
.br
Encoder flags can be passed directly as :FLAGNAME.
.br

.br
Note
.br
Setting the :low_delay flag will set by default profile=baseline, preset=ultrafast and tune=zerolatency options as well as x264-params for AVC|H264. If one or more of these options are set as filter arguments, no defaulting is used for all these options.
.br

.br
The filter will look for property TargetRate on input PID to set the desired bitrate per PID.
.br

.br
The filter will force a closed gop boundary:
.br
- at each packet with a FileNumber property set or a CueStart property set to true.
.br
- if .I fintra and .I rc is set.
.br

.br
When forcing a closed GOP boundary, the filter will flush, destroy and recreate the encoder to make sure a clean context is used, as currently many encoders in libavcodec do not support clean reset when forcing picture types.
.br
If .I fintra is not set and the output of the encoder is a DASH session in live profile without segment timeline, .I fintra will be set to the target segment duration and .I rc will be set.
.br

.br
The filter will look for property logpass on input PID to set 2-pass log filename, otherwise defaults to ffenc2pass-PID.log.
.br

.br
Arguments may be updated at runtime. If .I rld is set, the encoder will be flushed then reloaded with new options.
.br
If codec is video and .I fintra is set, reload will happen at next forced intra; otherwise, reload happens at next encode.
.br
The .I rld option is usually needed for dynamic updates of rate control parameters, since most encoders in ffmpeg do not support it.
.br

.br
.SH Options (expert):
.LP
.br
c (str):                       codec identifier. Can be any supported GPAC codec name or ffmpeg codec name - updated to ffmpeg codec name after initialization
.br
pfmt (pfmt, default: none):    pixel format for input video. When not set, input format is used
.br
fintra (frac, default: -1/1):  force intra / IDR frames at the given period in sec, e.g. fintra=2 will force an intra every 2 seconds and fintra=1001/1000 will force an intra every 30 frames on 30000/1001=29.97 fps video; ignored for audio
.br
all_intra (bool, default: false, updatable): only produce intra frames
.br
ls (bool, default: false):     log stats
.br
rc (bool, default: false):     reset encoder when forcing intra frame (some encoders might not support intra frame forcing)
.br
rld (bool, default: false, updatable): force reloading of encoder when arguments are updated
.br
round (sint, default: 1, updatable): round video up or down
.br
* 0: no rounding
.br
* 1: round up to match codec YUF format requirements
.br
* -1: round down to match codec YUF format requirements
.br
* other: round to lower (negative value) or higher (positive value), for example CTU size
.br

.br
* (str):                       any possible options defined for AVCodecContext and sub-classes. see gpac -hx ffenc and gpac -hx ffenc:*
.br

.br
.SH ffmx
.LP
.br
Description: FFmpeg multiplexer
.br
Version: Lavf61.9.100
.br

.br
Multiplexes files and open output protocols using FFmpeg.
.br
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details.
.br
To list all supported multiplexers for your GPAC build, use gpac -h ffmx:*.This will list both supported output formats and protocols.
.br
Output protocols are listed with Description: Output protocol, and the subclass name identifies the protocol scheme.
.br
For example, if ffmx:rtmp is listed as output protocol, this means rtmp:// destination URLs are supported.
.br

.br
Some URL formats may not be sufficient to derive the multiplexing format, you must then use .I ffmt to specify the desired format.
.br

.br
Unlike other multiplexing filters in GPAC, this filter is a sink filter and does not produce any PID to be redirected in the graph.
.br
The filter can however use template names for its output, using the first input PID to resolve the final name.
.br
The filter watches the property FileNumber on incoming packets to create new files.
.br

.br
All PID properties prefixed with meta: will be added as metadata.
.br

.br
The .I proto flag will disable FFmpeg muxer and use GPAC instead. Default format is MPEG-2 TS and can be specified using .I ext or .I mime.
.br
Example
.br
gpac -i SRC -o srt://127.0.0.1:1234:gpac:proto[:ext=mp4:frag]This will use the SRT protocol handler but GPAC m2ts multiplexer or mp4 muxer if ext=mp4:frag is set
.br

.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    location of destination file or remote URL
.br
start (dbl, default: 0.0):     set playback start offset. A negative value means percent of media duration with -1 equal to duration
.br
speed (dbl, default: 1.0):     set playback speed. If negative and start is 0, start is set to -1
.br
ileave (frac, default: 1):     interleave window duration in second, a value of 0 disable interleaving
.br
nodisc (bool, default: false): ignore stream configuration changes while multiplexing, may result in broken streams
.br
mime (cstr):                   set mime type for graph resolution
.br
ffiles (bool, default: false): force complete files to be created for each segment in DASH modes
.br
ffmt (str):                    force ffmpeg output format for the given URL
.br
block_size (uint, default: 4096): block size used to read file when using avio context
.br
keepts (bool, default: true):  do not shift input timeline back to 0
.br
proto (bool, default: false):  use protocol only: do not try to mux (useful when sending a SRT stream with remuxing)
.br
psleep (uint, default: 1000):  in protocol only mode, sleep for given amount of ms before EOS (do not kill connection right away for some protocols)
.br
* (str):                       any possible options defined for AVFormatContext and sub-classes (see gpac -hx ffmx and gpac -hx ffmx:*)
.br

.br
.SH ffavf
.LP
.br
Description: FFmpeg AV Filter
.br
Version: Lavfi10.6.101
.br

.br
This filter provides libavfilter raw audio and video tools.
.br
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details
.br
To list all supported avfilters for your GPAC build, use gpac -h ffavf:*.
.br

.br
.SH Declaring a filter
.LP
.br
The filter loads a filter or a filter chain description from the .I f option.
.br
Example
.br
ffavf:f=showspectrum
.br

.br

.br
Unlike other FFmpeg bindings in GPAC, this filter does not parse other libavfilter options, you must specify them directly in the filter chain, and the .I f option will have to be escaped.
.br
Example
.br
ffavf::f=showspectrum=size=320x320 or ffavf::f=showspectrum=size=320x320::pfmt=rgb
.br
ffavf::f=anullsrc=channel_layout=5.1:sample_rate=48000
.br

.br

.br
For complex filter graphs, it is possible to store options in a file (e.g. opts.txt):
.br
.br
:f=anullsrc=channel_layout=5.1:sample_rate=48000
.br

.br
And load arguments from file:
.br
.br
ffavf:opts.txt aout
.br

.br

.br
The filter will automatically create buffer and buffersink AV filters for data exchange between GPAC and libavfilter.
.br
The builtin options ( .I pfmt, .I afmt ...) can be used to configure the buffersink filter to set the output format of the filter.
.br

.br
.SH Naming of PIDs
.LP
.br
For simple filter graphs with only one input and one output, the input PID is assigned the avfilter name in and the output PID is assigned the avfilter name out
.br

.br
When a graph has several inputs, input PID names shall be assigned by the user using the ffid property, and mapping must be done in the filter.
.br
Example
.br
gpac -i video:#ffid=a -i logo:#ffid=b ffavf::f=[a][b]overlay=main_w-overlay_w-10:main_h-overlay_h-10 vout
.br

.br
In this example:
.br
- the video source is identified as a
.br
- the logo source is identified as b
.br
- the filter declaration maps a to its first input (in this case, main video) and b to its second input (in this case the overlay)
.br

.br
When a graph has several outputs, output PIDs will be identified using the ffid property set to the output avfilter name.
.br
Example
.br
gpac -i source ffavf::f=split inspect:SID=#ffid=out0 vout#SID=out1
.br

.br
In this example:
.br
- the splitter produces 2 video streams out0 and out1
.br
- the inspector only process stream with ffid out0
.br
- the video output only displays stream with ffid out1
.br

.br
The name(s) of the final output of the avfilter graph cannot be configured in GPAC. You can however name intermediate output(s) in a complex filter chain as usual.
.br

.br
.SH Filter graph commands
.LP
.br
The filter handles option updates as commands passed to the AV filter graph. The syntax expected in the option name is:
.br
* com_name=value: sends command com_name with value value to all filters
.br
* name#com_name=value: sends command com_name with value value to filter named name
.br

.br
.SH Options (expert):
.LP
.br
f (str):                       filter or filter chain description
.br
pfmt (pfmt, default: none):    pixel format of output. If not set, let AVFilter decide
.br
afmt (afmt, default: none):    audio format of output. If not set, let AVFilter decide
.br
sr (uint, default: 0):         sample rate of output. If not set, let AVFilter decide
.br
ch (uint, default: 0):         number of channels of output. If not set, let AVFilter decide
.br
dump (bool, default: false, updatable): dump graph as log media@info or stderr if not set
.br
* (str):                       any possible options defined for AVFilter and sub-classes (see gpac -hx ffavf and gpac -hx ffavf:*)
.br

.br
.SH ffbsf
.LP
.br
Description: FFmpeg bitstream filter
.br
Version: Lavu59.46.100
.br

.br
This filter provides bitstream filters (BSF) for compressed audio and video formats.
.br
See FFmpeg documentation (https://ffmpeg.org/documentation.html) for more details
.br
To list all supported bitstream filters for your GPAC build, use gpac -h ffbsf:*.
.br

.br
Several BSF may be specified in .I f for different coding types. BSF not matching the coding type are silently ignored.
.br
When no BSF matches the input coding type, or when .I f is empty, the filter acts as a passthrough filter.
.br

.br
Options are specified after the desired filters:
.br
- ffbsf:f=h264_metadata:video_full_range_flag=0
.br
- ffbsf:f=h264_metadata,av1_metadata:video_full_range_flag=0:color_range=tv
.br

.br
Note: Using BSFs on some media types (e.g. avc, hevc) may trigger creation of a reframer filter (e.g. rfnalu)
.br

.br
.SH Options (expert):
.LP
.br
f (strl):                      bitstream filters name - see filter help
.br
* (str):                       any possible options defined for AVBitstreamFilter and sub-classes. See gpac -hx ffbsf and gpac -hx ffbsf:*
.br

.br
.SH jsf
.LP
.br
Description: JavaScript filter
.br

.br
This filter runs a javascript file specified in .I js defining a new JavaScript filter.
.br
  
.br
For more information on how to use JS filters, please check https://wiki.gpac.io/Howtos/jsf/jsfilter
.br

.br
.SH Options (expert):
.LP
.br
js (cstr):                     location of script source
.br
* (str):                       any possible options defined for the script (see gpac -hx jsf:js=$YOURSCRIPT or gpac -hx $YOURSCRIPT)
.br

.br
.SH routeout
.LP
.br
Description: MABR & ROUTE output
.br

.br
The ROUTE output filter is used to distribute a live file-based session using ROUTE or DVB-MABR.
.br
The filter supports DASH and HLS inputs, ATSC3.0 signaling and generic ROUTE or DVB-MABR signaling.
.br

.br
The filter is identified using the following URL schemes:
.br
* `atsc://`: session is a full ATSC 3.0 session
.br
* `route://IP:port`: session is a ROUTE session running on given multicast IP and port
.br
* `mabr://IP:port`: session is a DVB-MABR session using FLUTE running on given multicast IP and port
.br

.br
The filter only accepts input PIDs of type FILE.
.br
- HAS Manifests files are detected by file extension and/or MIME types, and sent as part of the signaling bundle or as LCT object files for HLS child playlists.
.br
- HAS Media segments are detected using the OrigStreamType property, and send as LCT object files using the DASH template string.
.br
- A PID without OrigStreamType property set is delivered as a regular LCT object file (called raw hereafter).
.br
  
.br
For raw file PIDs, the filter will look for the following properties:
.br
* `MCASTName`: set resource name. If not found, uses basename of URL
.br
* `MCASTCarousel`: set repeat period. If not found, uses .I carousel. If 0, the file is only sent once
.br
* `MCASTUpload`: set resource upload time. If not found, uses .I carousel. If 0, the file will be sent as fast as possible.
.br

.br
When DASHing for ROUTE, DVB-MABR or single service ATSC, a file extension, either in .I dst or in .I ext, may be used to identify the HAS session type (DASH or HLS).
.br
Example
.br
"route://IP:PORT/manifest.mpd", "route://IP:PORT/:ext=mpd"
.br

.br

.br
When DASHing for multi-service ATSC, forcing an extension will force all service to use the same formats.
.br
Example
.br
"atsc://:ext=mpd", "route://IP:PORT/manifest.mpd"
.br

.br
If multiple services with different formats are needed, you will need to explicit your filters:
.br
.br
gpac -i DASH_URL:#ServiceID=1 dashin:forward=file:FID=1 -i HLS_URL:#ServiceID=2 dashin:forward=file:FID=2 -o atsc://:SID=1,2
.br
gpac -i MOVIE1:#ServiceID=1 dasher:FID=1:mname=manifest.mpd -i MOVIE2:#ServiceID=2 dasher:FID=2:mname=manifest.m3u8 -o atsc://:SID=1,2
.br

.br

.br
Warning: When forwarding an existing DASH/HLS session, do NOT set any extension or manifest name.
.br

.br
The filter will look for MCASTIP and MCASTPort properties on the incoming PID to setup multicast of each service. If not found, the default .I ip and port will be used, with port incremented by one for each new multicast stream.
.br

.br
By default, all streams in a service are assigned to a single multicast session, and differentiated by TSI (see .I splitlct).
.br
TSI are assigned as follows:
.br
- signaling TSI is always 0 for ROUTE, 1 for DVB+Flute
.br
- raw files are assigned TSI 1 and increasing number of TOI
.br
- otherwise, the first PID found is assigned TSI 10, the second TSI 20 etc ...
.br

.br
When .I splitlct is set to mcast, the IP multicast address is computed as follows:
.br
 - if MCASTIP is set on the PID and is different from the service multicast IP, it is used
.br
 - otherwise the service multicast IP plus one is used
.br
The multicast port used is set as follows:
.br
- if MCASTPort is set on the PID, it is used
.br
- otherwise the same port as the service one is used.
.br
Init segments and HLS child playlists are sent before each new segment, independently of .I carousel.
.br
.SH ATSC 3.0 mode
.LP
.br
In this mode, the filter allows multiple service multiplexing, identified through the ServiceID property.
.br
By default (see above), a single multicast IP is used for route sessions, each service will be assigned a different port.
.br

.br
ATSC 3.0 attributes set by using the following PID properties:
.br
* ATSC3ShortServiceName: set the short service name, maxiumu of 7 characters.  If not found, ServiceName is checked, otherwise default to GPAC.
.br
* ATSC3MajorChannel: set major channel number of service. Default to 2.  This really should be set and should not use the default.
.br
* ATSC3MinorChannel: set minor channel number of service. Default of 1.
.br
* ATSC3ServiceCat: set service category, default to 1 if not found. 1=Linear a/v service. 2=Linear audio only service. 3=App-based service. 4=ESg service. 5=EA service. 6=DRM service.
.br
* ATSC3hidden: set if service is hidden.  Boolean true or false. Default of false.
.br
* ATSC3hideInGuide: set if service is hidden in ESG.  Boolean true or false. Default of false.
.br
* ATSC3configuration: set service configuration.  Choices are Broadcast or Broadband.  Default of Broadcast
.br

.br
.SH ROUTE mode
.LP
.br
In this mode, only a single service can be distributed by the ROUTE session.
.br
Note: .I ip is ignored, and .I first_port is used if no port is specified in .I dst.
.br
The ROUTE session will include a multi-part MIME unsigned package containing manifest and S-TSID, sent on TSI=0.
.br

.br
.SH DVB-MABR mode
.LP
.br
In this mode, the filter allows multiple service multiplexing, identified through the ServiceID and ServiceName properties.
.br
Note: .I ip and .I first_port are used to send the multicast gateway configuration, init segments and manifests. .I first_port is used only if no port is specified in .I dst.
.br

.br
The session will carry DVB-MABR gateway configuration, maifests and init segments on TSI=1
.br

.br
The FLUTE session always uses a symbol length of .I mtu minus 44 bytes.
.br

.br
.SH Low latency mode
.LP
.br
When using low-latency mode (-llmode)(), the input media segments are not re-assembled in a single packet but are instead sent as they are received.
.br
In order for the real-time scheduling of data chunks to work, each fragment of the segment should have a CTS and timestamp describing its timing.
.br
If this is not the case (typically when used with an existing DASH session in file mode), the scheduler will estimate CTS and duration based on the stream bitrate and segment duration. The indicated bitrate is increased by .I brinc percent for safety.
.br
If this fails, the filter will trigger warnings and send as fast as possible.
.br
Note: The LCT objects are sent with no length (TOL header) assigned until the final segment size is known, potentially leading to a final 0-size LCT fragment signaling only the final size.
.br

.br
In this mode, init segments and manifests are sent at the frequency given by property MCASTCarousel of the source PID if set or by (-carousel)[] option.
.br
Indicating MCASTCarousel=0 will disable mid-segment repeating of manifests and init segments.
.br
.SH Examples
.LP
.br
Since the ROUTE filter only consumes files, it is required to insert:
.br
- the dash demultiplexer in file forwarding mode when loading a DASH session
.br
- the dash multiplexer when creating a DASH session
.br

.br
Multiplexing an existing DASH session in route:
.br
.br
gpac -i source.mpd dashin:forward=file -o route://225.1.1.0:6000/
.br

.br
Multiplexing an existing DASH session in atsc:
.br
.br
gpac -i source.mpd dashin:forward=file -o atsc://
.br

.br
Dashing and multiplexing in route:
.br
.br
gpac -i source.mp4 dasher:profile=live -o route://225.1.1.0:6000/manifest.mpd
.br

.br
Dashing and multiplexing in route Low Latency:
.br
.br
gpac -i source.mp4 dasher -o route://225.1.1.0:6000/manifest.mpd:profile=live:cdur=0.2:llmode
.br

.br

.br
Sending a single file in ROUTE using half a second upload time, 2 seconds carousel:
.br
.br
gpac -i URL:#MCASTUpload=0.5:#MCASTCarousel=2 -o route://225.1.1.0:6000/
.br

.br

.br
Common mistakes:
.br
.br
gpac -i source.mpd -o route://225.1.1.0:6000/
.br

.br
This will only send the manifest file as a regular object and will not load the dash session.
.br
Example
.br
gpac -i source.mpd dashin:forward=file -o route://225.1.1.0:6000/manifest.mpd
.br

.br
This will force the ROUTE multiplexer to only accept .mpd files, and will drop all segment files (same if .I ext is used).
.br
Example
.br
gpac -i source.mpd dasher -o route://225.1.1.0:6000/
.br
gpac -i source.mpd dasher -o route://225.1.1.0:6000/manifest.mpd
.br

.br
These will demultiplex the input, re-dash it and send the output of the dasher to ROUTE
.br

.br
.SH Error simulation
.LP
.br
It is possible to simulate errors with (-errsim)(). In this mode the LCT network sender implements a 2-state Markov chain:
.br
.br
gpac -i source.mpd dasher -o route://225.1.1.0:6000/:errsim=1.0x98.0
.br

.br
This will set a 1.0 percent chance to transition to error (not sending data over the network) and 98.0 percent chance to transition from error back to OK.
.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    destination URL
.br
ext (cstr):                    set extension for graph resolution, regardless of file extension
.br
mime (cstr):                   set mime type for graph resolution
.br
ifce (str):                    default interface to use for multicast. If NULL, the default system interface will be used
.br
carousel (uint, default: 1000): carousel period in ms for repeating signaling and raw file data
.br
first_port (uint, default: 6000): port number of first ROUTE session in ATSC mode
.br
ip (str, default: 225.1.1.0):  multicast IP address for ROUTE session in ATSC mode
.br
ttl (uint, default: 0):        time-to-live for multicast packets
.br
bsid (uint, default: 800):     ID for ATSC broadcast stream
.br
mtu (uint, default: 1472):     size of LCT MTU in bytes
.br
splitlct (enum, default: off): split mode for LCT channels
.br
* off: all streams are in the same LCT channel
.br
* type: each new stream type results in a new LCT channel
.br
* all: all streams are in dedicated LCT channel, the first stream being used for STSID signaling
.br
* mcast: all streams are in dedicated multicast groups
.br

.br
korean (bool, default: false): use Korean version of ATSC 3.0 spec instead of US
.br
llmode (bool, default: false): use low-latency mode
.br
brinc (uint, default: 10):     bitrate increase in percent when estimating timing in low latency mode
.br
noreg (bool, default: false):  disable rate regulation for media segments, pushing them as fast as received
.br
runfor (uint, default: 0):     run for the given time in ms
.br
nozip (bool, default: false):  do not zip signaling package (STSID+manifest)
.br
furl (bool, default: false):   inject full URLs of source service in the signaling instead of stripped server path
.br
flute (bool, default: true):   use flute for DVB-MABR object delivery
.br
csum (enum, default: meta):    send MD5 checksum for DVB flute
.br
* no: do not send checksum
.br
* meta: only send checksum for configuration files, manifests and init segments
.br
* all: send checksum for everything
.br

.br
recv_obj_timeout (uint, default: 50): set timeout period in ms before client resorts to unicast repair
.br
errsim (v2d, default: 0.0x100.0): simulate errors using a 2-state Markov chain. Value are percentages
.br
use_inband (bool, default: false): DVB mabr option: If true send the mani and init segment in content transport sessions instead of configuration transport session
.br
ssm (bool, default: false):    indicate source-specific multicast for DVB-MABR, requires ifce to be set
.br

.br
.SH rftruehd
.LP
.br
Description: TrueHD reframer
.br

.br
This filter parses Dolby TrueHD files/data and outputs corresponding audio PID and frames.
.br

.br
.SH Options (expert):
.LP
.br
index (dbl, default: 1.0):     indexing window length
.br
auxac3 (bool, default: false): expose auxiliary AC-3 stream if present
.br

.br
.SH cryptin
.LP
.br
Description: CryptFile input
.br

.br
This filter dispatch raw blocks from encrypted files with AES 128 CBC in PKCS7 to clear input files
.br

.br
The filter is automatically loaded by the DASH/HLS demultiplexer and should not be explicitly loaded by your application.
.br

.br
The filter accepts URL with scheme gcryp://URL, where URL is the URL to decrypt.
.br

.br
The filter can process http(s) and local file key URLs (setup through HLS manifest), and expects a full key (16 bytes) as result of resource fetching.
.br

.br
.SH Options (expert):
.LP
.br
src (cstr):                    location of source file
.br
fullfile (bool, default: false): reassemble full file before decryption
.br

.br
.SH cryptout
.LP
.br
Description: CryptFile output
.br

.br
This filter dispatch raw blocks from clear input files to encrypted files with AES 128 CBC in PKCS7
.br

.br
The filter is automatically loaded by the DASH/HLS multiplexer and should not be explicitly loaded by your application.
.br

.br
The filter accepts URL with scheme gcryp://URL, where URL is the URL to encrypt.
.br

.br
.SH Options (expert):
.LP
.br
dst (cstr):                    location of source file
.br
fullfile (bool, default: false): reassemble full file before decryption
.br

.br
.SH restamp
.LP
.br
Description: Timestamp rewriter
.br

.br
This filter rewrites timing (offsets and rate) of packets.
.br

.br
The delays (global or per stream class) can be either positive (stream presented later) or negative (stream presented sooner).
.br

.br
The specified .I fps can be either 0, positive or negative.
.br
- if 0 or if the stream is audio, stream rate is not modified.
.br
- otherwise if negative, stream rate is multiplied by -fps.num/fps.den.
.br
- otherwise if positive and the stream is not video, stream rate is not modified.
.br
- otherwise (video PID), constant frame rate is assumed and:
.br
  - if .I rawv = no, video frame rate is changed to the specified rate (speed-up or slow-down).
.br
  - if .I rawv = force, input video stream is decoded and video frames are dropped/copied to match the new rate.
.br
  - if .I rawv = dyn, input video stream is decoded if not all-intra and video frames are dropped/copied to match the new rate.
.br

.br
Note: frames are simply copied or dropped with no motion compensation.
.br

.br
When .I align is not 0, if the difference between two consecutive timestamps is greater than the specified threshold, the new timestamp 
.br
is set to the last computed timestamp plus the minimum packet duration for the stream.
.br

.br
.SH Options (expert):
.LP
.br
fps (frac, default: 0/1):      target fps
.br
delay (frac, default: 0/1, updatable): delay to add to all streams
.br
delay_v (frac, default: 0/1, updatable): delay to add to video streams
.br
delay_a (frac, default: 0/1, updatable): delay to add to audio streams
.br
delay_t (frac, default: 0/1, updatable): delay to add to text streams
.br
delay_o (frac, default: 0/1, updatable): delay to add to other streams
.br
rawv (enum, default: no):      copy video frames
.br
* no: no raw frame copy/drop
.br
* force: force decoding all video streams
.br
* dyn: decoding video streams if not all intra
.br

.br
tsinit (lfrac, default: -1/1): initial timestamp to resync to, negative values disables resync
.br
align (uint, default: 0):      timestamp alignment threshold (0 disables alignment) - see filter help
.br
reorder (bool, default: false): reorder input packets by CTS (resulting PID may fail decoding)
.br

.br
.SH oggmx
.LP
.br
Description: OGG multiplexer
.br

.br
This filter multiplexes audio and video to produce an OGG stream.
.br

.br
The .I cdur option allows specifying the interleaving duration (max time difference between consecutive packets of different streams). 
.br

.br
.SH Options (expert):
.LP
.br
cdur (frac, default: 1/10):    stream interleaving duration in seconds
.br
rcfg (frac, default: 0/1):     stream config re-injection frequency in seconds
.br

.br
.SH unframer
.LP
.br
Description: Stream rewriter
.br

.br
This filter is used to force reframing of input sources using the same internal framing as GPAC (e.g. ISOBMFF) but with broken framing or signaling.
.br
Example
.br
gpac -i src.mp4 unframer -o dst.mp4
.br

.br
This will:
.br
- force input PIDs of unframer to be in serialized form (AnnexB, ADTS, ...)
.br
- trigger reframers to be instanciated after the unframer filter.
.br
Using the unframer filter avoids doing a dump to disk then re-import or other complex data piping.
.br

.br
No options
.br

.br
.SH writeuf
.LP
.br
Description: Framed to Unframed converter
.br

.br
Generic single stream to unframed format converter, used when converting PIDs. This filter should not be explicitly loaded.
.br

.br
No options
.br

.br
.SH ttmlmerge
.LP
.br
Description: TTML sample merger
.br

.br
Merge input samples into a single TTML sample. Merging restarts at the start of DASH segments.
.br

.br
No options
.br

.br
.SH uncvdec
.LP
.br
Description: UNCV decoder
.br

.br
This filter translates UNCV pixel format to a usable pixel format.
.br

.br
.SH Options (expert):
.LP
.br
force_pf (bool, default: false): ignore possible mapping to GPAC pixel formats
.br
no_tile (bool, default: false): ignore tiling info (debug)
.br

.br
.SH ghidmx
.LP
.br
Description: GHI demultiplexer
.br

.br
This filter handles pre-indexed content for just-in-time processing of HAS manifest, init segment and segments
.br

.br
Warning: This is work in progress, the format of indexes (binary or XML) may change until finalization of this filter.
.br

.br
.SH Generating indexes
.LP
.br
Indexes are constructed using the dasher filter and a given segment duration.
.br
Example
.br
gpac -i SRC [... -i SRCn] -o index.ghi:segdur=2
.br

.br
This constructs a binary index for the DASH session.
.br
Example
.br
gpac -i SRC -o index.ghix:segdur=2
.br

.br
This constructs an XML index for the DASH session.
.br

.br
Warning: XML indexes should only be used for debug purposes as they can take a significant amount of time to be parsed.
.br

.br
When indexing, the default template used is $Representation$_$Number$. The template is stored in the index and shouldn't be re-specified when generating content.
.br

.br
.SH Using indexes
.LP
.br
The index can be used to generate manifest, child variants for HLS, init segments and segments.
.br
Example
.br
gpac -i index.ghi:gm=all -o dash/vod.mpd
.br

.br
This generates manifest(s) and init segment(s).
.br

.br
Example
.br
gpac -i index.ghi:rep=FOO:sn=10 -o dash/vod.mpd
.br

.br
This generates the 10th segment of representation with ID FOO.
.br

.br
Note: The manifest file(s) and init segment(s) are not written when generating a segment. The manifest target (mpd or m3u8) is only used to setup the filter chain and target output path.
.br

.br
Example
.br
gpac -i index.ghi:gm=main -o dash/vod.m3u8
.br

.br
This generates main manifest only (MPD or master HLS playlist).
.br

.br
Example
.br
gpac -i index.ghi:gm=child:rep=FOO:out=BAR -o dash/vod.m3u8
.br

.br
This generates child manifest for representation FOO in file BAR.
.br

.br
Example
.br
gpac -i index.ghi:gm=init:rep=FOO:out=BAR2 -o dash/vod.m3u8
.br

.br
This generates init segment for representation FOO in file BAR2.
.br

.br
The filter outputs are PIDs using framed packets marked with segment boundaries and can be chained to other filters before entering the dasher (e.g. for encryption, transcode...).
.br

.br
If representation IDs are not assigned during index creation, they default to the 1-based index of the source. You can check them using:
.br
.br
gpac -i src.ghi inspect:full
.br

.br

.br
.SH Muxed Representations
.LP
.br
The filter can be used to generate muxed representations, either at manifest generation time or when generating a segment.
.br
Example
.br
gpac -i index.ghi:mux=A@V1@V2 -o dash/vod.mpd
.br

.br
This will generate a manifest muxing representations A with representations V1 and V2.
.br

.br
Example
.br
gpac -i index.ghi:mux=A@V1@V2,T@V1@V2 -o dash/vod.mpd
.br

.br
This will generate a manifest muxing representations A and T with representations V1 and V2.
.br

.br
Example
.br
gpac -i index.ghi:rep=V2:sn=5:mux=A@V2 -o dash/vod.mpd
.br

.br
This will generate the 5th segment containing representations A and V2.
.br

.br
The filter does not store any state, it is the user responsibility to use consistent information across calls:
.br
- do not change segment templates
.br
- do not change muxed representations to configurations not advertised in the generated manifests
.br

.br
.SH Recommendations
.LP
.br
Indexing supports fragmented and non-fragmented MP4, MPEG-2 TS and seekable inputs.
.br
- It is recommended to use fragmented MP4 as input format since this greatly reduces file loading times.
.br
- If non-fragmented MP4 are used, it is recommended to use single-track files to decrease the movie box size and speedup parsing.
.br
- MPEG-2 TS sources will be slower since they require PES reframing and AU reformatting, resulting in more IOs than with mp4.
.br
- other seekable sources will likely be slower (seeking, reframing) and are not recommended.
.br

.br
.SH Options (expert):
.LP
.br
gm (enum, default: main):      manifest generation mode
.br
* none: no manifest generation (implied if sn is not 0)
.br
* all: generate all manifests and init segments
.br
* main: generate main manifest (MPD or master M3U8)
.br
* child: generate child playlist for HLS
.br
* init: generate init segment
.br

.br
force (bool, default: false):  force loading sources in manifest generation for debug
.br
rep (str):                     representation to generate
.br
sn (uint):                     segment number to generate, 0 means init segment
.br
mux (strl):                    representation to mux - cf filter help
.br
out (str):                     output filename to generate
.br

.br
.SH evgs
.LP
.br
Description: EVG video rescaler
.br

.br
This filter rescales raw video data using GPAC's EVG library to the specified size and pixel format.
.br
.SS Output size assignment
.br
If .I osize is {0,0}, the output dimensions will be set to the input size, and input aspect ratio will be ignored.
.br

.br
If .I osize is {0,H} (resp. {W,0}), the output width (resp. height) will be set to respect input aspect ratio. If .I keepar = nosrc, input sample aspect ratio is ignored.
.br
.SS Aspect Ratio and Sample Aspect Ratio
.br
When output sample aspect ratio is set, the output dimensions are divided by the output sample aspect ratio.
.br
Example
.br
evgs:osize=288x240:osar=3/2
.br

.br
The output dimensions will be 192x240.
.br

.br
When aspect ratio is not kept (.I keepar = off):
.br
- source is resampled to desired dimensions
.br
- if output aspect ratio is not set, output will use source sample aspect ratio
.br

.br
When aspect ratio is partially kept (.I keepar = nosrc):
.br
- resampling is done on the input data without taking input sample aspect ratio into account
.br
- if output sample aspect ratio is not set (.I osar = 0/N), source aspect ratio is forwarded to output.
.br

.br
When aspect ratio is fully kept (.I keepar = full), output aspect ratio is force to 1/1 if not set.
.br

.br
When sample aspect ratio is kept, the filter will:
.br
- center the rescaled input frame on the output frame
.br
- fill extra pixels with .I padclr
.br

.br
.SH Options (expert):
.LP
.br
osize (v2di):                  osize of output video
.br
ofmt (pfmt, default: none):    pixel format for output video. When not set, input format is used
.br
ofr (bool, default: false):    force output full range
.br
keepar (enum, default: off):   keep aspect ratio
.br
* off: ignore aspect ratio
.br
* full: respect aspect ratio, applying input sample aspect ratio info
.br
* nosrc: respect aspect ratio but ignore input sample aspect ratio
.br

.br
padclr (str, default: black):  clear color when aspect ration preservation is used
.br
osar (frac, default: 0/1):     force output pixel aspect ratio
.br
nbth (sint, default: -1):      number of threads to use, -1 means all cores
.br
hq (bool, default: false):     use bilinear interpolation instead of closest pixel
.br

.br
.SH ccdec
.LP
.br
Description: Closed-Caption decoder
.br

.br
This filter decodes Closed Captions to unframed SRT.
.br
Supported video media types are MPEG2, AVC, HEVC, VVC and AV1 streams.
.br

.br
Only a subset of CEA 608/708 is supported.
.br

.br
.SH Options (expert):
.LP
.br
field (uint, default: 1):      field to decode
.br
agg (enum, default: none):     output aggregation mode
.br
* none: forward data as decoded (default)
.br
* word: aggregate words (separated by a space)
.br

.br

.br
.SH scte35dec
.LP
.br
Description: SCTE35 decoder
.br

.br
This filter writes the SCTE-35 markers attached as properties to audio and video
.br
packets or inside a dedicated stream, as 23001-18 'emib' boxes. It also creates
.br
empty 'emeb' box in between following segmentation as hinted by the graph.
.br

.br
.SH Options (expert):
.LP
.br
mode (enum, default: 23001-18): mode to operate in
.br
* 23001-18: extract SCTE-35 markers as emib/emeb boxes for Event Tracks
.br
* passthrough: pass-through mode adding cue start property on splice points
.br

.br
segdur (frac, default: 1/1):   segmentation duration in seconds. 0/0 flushes immediately for each input packet (beware of the bitrate overhead)
.br

.br
.SH seiload
.LP
.br
Description: SEI message loader
.br

.br
This filter loads known inband metadata as packet properties
.br

.br
No options
.br

.br
.SH wcdec
.LP
.br
Description: WebCodec decoder
.br

.br
This filter decodes video streams using WebCodec decoder of the browser
.br

.br
.SH Options (expert):
.LP
.br
queued (uint, default: 10):    maximum number of packets to queue in webcodec instance
.br

.br
.SH wcenc
.LP
.br
Description: WebCodec encoder
.br

.br
This filter encodes video streams using WebCodec encoder of the browser
.br

.br
.SH Options (expert):
.LP
.br
c (str):                       codec identifier. Can be any supported GPAC codec name or ffmpeg codec name - updated to ffmpeg codec name after initialization
.br
fintra (frac, default: -1/1):  force intra / IDR frames at the given period in sec, e.g. fintra=2 will force an intra every 2 seconds and fintra=1001/1000 will force an intra every 30 frames on 30000/1001=29.97 fps video; ignored for audio
.br
all_intra (bool, default: false, updatable): only produce intra frames
.br
b (uint, default: 0):          bitrate in bits per seconds, defaults to 2M for video and 124K for audio
.br
queued (uint, default: 10):    maximum number of packets to queue in webcodec instance
.br

.br
.SH webgrab
.LP
.br
Description: Web-based AV capture
.br

.br
This filter grabs audio and video streams MediaStreamTrackProcessor of the browser
.br

.br
Supported URL schemes:
.br
- video:// grabs from camera
.br
- audio:// grabs from microphone
.br
- av:// grabs both audio from microphone and video from camera
.br
- video://ELTID grabs from DOM element with ID ELTID (the element must be a valid element accepted by VideoFrame constructor)
.br

.br
.SH Options (expert):
.LP
.br
src (str):                     source url
.br
vsize (v2di, default: 0x0):    desired webcam resolution
.br
back (bool, default: false):   use back camera
.br
ntp (bool, default: false):    mark packets with NTP
.br
alpha (bool, default: false):  keep alpha when brabbing canvas
.br
fps (frac, default: 0/1):      framerate to use when grabbing images - 0 FPS means single image
.br

.br
.SH dtout
.LP
.br
Description: DekTec SDI output
.br

.br
This filter provides SDI output to be used with DTA 2174 or DTA 2154 cards.
.br

.br
.SH Options (expert):
.LP
.br
bus (sint, default: -1):       PCI bus number. If not set, device discovery is used
.br
slot (sint, default: -1):      PCI bus number. If not set, device discovery is used
.br
fps (frac, default: 30/1):     default FPS to use if input stream fps cannot be detected
.br
clip (bool, default: false):   clip YUV data to valid SDI range, slower
.br
port (uint, default: 1):       set sdi output port of card
.br
start (dbl, default: 0.0):     set playback start offset, [-1, 0] means percent of media dur, e.g. -1 == dur
.br

.br
.SH ohevcdec
.LP
.br
Description: OpenHEVC decoder
.br

.br
This filter decodes HEVC and LHVC (HEVC scalable extensions) from one or more PIDs through the OpenHEVC library
.br

.br
.SH Options (expert):
.LP
.br
threading (enum, default: frame): set threading mode
.br
* frameslice: parallel decoding of both frames and slices
.br
* frame: parallel decoding of frames
.br
* slice: parallel decoding of slices
.br

.br
nb_threads (uint, default: 0): set number of threads (if 0, uses number of cores minus one)
.br
no_copy (bool, default: false): directly dispatch internal decoded frame without copy
.br
pack_hfr (bool, default: false): pack 4 consecutive frames in a single output
.br
seek_reset (bool, default: false): reset decoder when seeking
.br
force_stereo (bool, default: true): use stereo output for multiview (top-bottom only)
.br
reset_switch (bool, default: false): reset decoder at config change
.br

.br
.SH uncvg
.LP
.br
Description: Uncompressed Video Generator
.br
Version: 1.0
.br
Author: GPAC team - (c) Telecom ParisTech 2023 - license LGPL v2
.br

.br
This filter provides generation of test images for ISO/IEC 23001-17
.br
Generated pixels can be:
.br
- a pattern of colors in columns, or in rectangles if .I sq is set, using the specified palette.
.br
- an image source if .I img is used.
.br

.br
Colors specified in the palette can be default GPAC colors (see gpac -h colors), 0xRRGGBB or 0xAARRGGBB
.br

.br
When generating video, the pixels are shifted to the left at every frame
.br

.br
Components are described as N[bpc][+k] with
.br
* N: component type, one of M(mono), Y, U, V, R, G, B, A, d(depth), disp, p(palette), f(filterArray), x (pad)
.br
* bpc: bits per component value, default is 8. Non-integer values must be one of
.br
  * sft: floating-point value on 16 bits
.br
  * flt: floating-point value on 32 bits
.br
  * dbl: floating-point value on 64 bits
.br
  * dblx: floating-point value on 128 bits
.br
  * cps: complex value as two floats on 16 bits each
.br
  * cpf: complex value as two floats on 32 bits each
.br
  * cpd: complex value as two floats on 64 bits each
.br
  * cpx: complex value as two floats on 128 bits each
.br
* k: force component alignment on k bytes, default is 0 (no alignment)
.br

.br
.SH Options (expert):
.LP
.br
vsize (v2d, default: 128x128): width and height of output image
.br
c (strl, default: R8,G8,B8):   image components
.br
tiles (v2d, default: 1x1):     number of horizontal and vertical tiles
.br
interleave (enum, default: pix): interleave type
.br
* comp: component-based interleaving (planar modes)
.br
* pix: pixel-based interleaving (packed modes)
.br
* mix: pixel-based interleaving for UV (semi-planar modes)
.br
* row: row-based interleaving
.br
* tile: tile-component interleaving
.br
* multi: pixel-based interleaving (packed modes) for sub-sampled modes
.br

.br
sampling (enum, default: none): sampling types
.br
* none: no sub-sampling
.br
* 422: YUV 4:2:2 sub-sampling
.br
* 420: YUV 4:2:0 sub-sampling
.br
* 411: YUV 4:1:1 sub-sampling
.br

.br
block_size (uint, default: 0): block size in bytes
.br
pad_lsb (bool, default: false): padded bits are at LSB in the block
.br
ble (bool, default: false):    block is little endian
.br
br (bool, default: false):     block has reversed components
.br
pixel_size (uint, default: 0): size of pixel in bytes
.br
row_align (uint, default: 0):  row alignment in bytes
.br
tile_align (uint, default: 0): tile alignment in bytes
.br
cle (bool, default: false):    byte-aligned components are little endian
.br
img (str, default: ):          use specified image as input instead of RGB generation
.br
asize (bool, default: false):  use input image size
.br
pal (strl, default: red,green,blue,white,black,yellow,cyan,grey,orange,violet): default palette for color generation
.br
fa (strl, default: B,G,G,R):   bayer-like filter - only 2x2 on R,G,B components is supported
.br
bpm (strl, default: ):         set sensor bad pixel map as a list of cN (broken column), rM (broken row) or NxM (single pixel)
.br
fps (frac, default: 25/1):     frame rate to generate - using 0 will trigger item muxing
.br
dur (frac, default: 1/1):      duration to generate - using 0 will trigger item muxing
.br
cloc (uint, default: -1, minmax: -1,6): set chroma location type
.br
stereo (bool, default: false): dump a stereo image
.br
sq (flt, default: 0):          generate square patterns instead of columns
.br
shade (bool, default: false):  shade pixels from black at bottom to full intensity at top
.br
scpt (bool, default: false):   use single color per tile, first tile using the first color in palette
.br

.br
.SH glpush
.LP
.br
Description: GPU texture uploader
.br
Version: 1.0
.br
Author: GPAC team
.br

.br
This filter pushes input video streams to GPU as OpenGL textures. It can be used to simulate hardware decoders dispatching OpenGL textures
.br

.br
No options
.br

.br
.SH thumbs
.LP
.br
Description: Thumbnail generator
.br
Version: 1.0
.br
Author: GPAC team
.br

.br
This filter generates screenshots from a video stream.
.br

.br
The input video is down-sampled by the .I scale factor. The output size is configured based on the number of images per line and per column in the .I grid. 
.br
Once configured, the output size is no longer modified.
.br

.br
The .I snap option indicates to use one video frame every given seconds. If value is 0, all input frames are used.
.br

.br
If the number of rows is 0, it will be computed based on the source duration and desired .I snap time, and will default to 10 if it cannot be resolved.
.br

.br
To output one image per input frame, use :grid=1x1.
.br

.br
If a single image per output frame is used, the default value for .I snap is 0 and for .I scale is 1.
.br
Otherwise, the default value for .I snap is 1 second and for .I scale is 10.
.br

.br
A single line of text can be inserted over each frame. Predefined keywords can be used in input text, identified as $KEYWORD$:
.br
* ts: replaced by packet timestamp
.br
* timescale: replaced by PID timescale
.br
* time: replaced by packet time as HH:MM:SS.ms
.br
* cpu: replaced by current CPU usage of process
.br
* mem: replaced by current memory usage of process
.br
* version: replaced by GPAC version
.br
* fversion: replaced by GPAC full version
.br
* mae: replaced by Mean Absolute Error with previous frame
.br
* mse: replaced by Mean Square Error with previous frame
.br
* P4CC, PropName: replaced by corresponding PID property
.br

.br
Example
.br
gpac -i src reframer:saps=1 thumbs:snap=30:grid=6x30 -o dump/$num$.png
.br

.br
This will generate images from key-frames only, inserting one image every 30 seconds. Using key-frame filtering is much faster but may give unexpected results if there are not enough key-frames in the source.
.br

.br
Example
.br
gpac -i src thumbs:snap=0:grid=5x5 -o dump/$num$.png
.br

.br
This will generate one image containing 25 frames every second at 25 fps.
.br

.br
If a single image per output frame is used and the scaling factor is 1, the input packet is reused as input with text and graphics overlaid.
.br

.br
Example
.br
gpac -i src thumbs:grid=1x1:txt='Frame $time$' -o dump/$num$.png
.br

.br
This will inject text over each frame and keep timing and other packet properties.
.br

.br
A json output can be specified in input .I list to let applications retrieve frame position in output image from its timing.
.br

.br
.SH Scene change detection
.LP
.br

.br
The filter can compute the absolute and/or square error metrics between consecutive images and drop image if the computed metric is less than the given threshold.
.br
If both .I mae and .I mse thresholds are 0, scene detection is not performed (default).
.br
If both .I mae and .I mse thresholds are not 0, the frame is added if it passes both thresholds.
.br

.br
For both metrics, a value of 0 means all pixels are the same, a value of 100 means all pixels have 100% intensity difference (e.g. black versus white).
.br

.br
The scene detection is performed after the .I snap filtering and uses:
.br
- the previous frame in the stream, whether it was added or not, if .I scref is not set,
.br
- the last added frame otherwise.
.br

.br
Typical thresholds for scene cut detection are 14 to 20 for .I mae and 5 to 7 for .I mse.
.br

.br
Since this is a costly process, it is recommended to use it combined with key-frames selection:
.br

.br
Example
.br
gpac -i src reframer:saps=1 thumbs:mae=15 -o dump/$num$.png
.br

.br

.br
The .I maxsnap option can be used to force insertion after the given time if no scene cut is found.
.br

.br
.SH Options (expert):
.LP
.br
grid (v2di, default: 6x0):     number of images per lines and columns
.br
scale (dbl, default: -1):      scale factor for input size
.br
mae (uint, default: 0, minmax: 0,100): scene diff threshold using Mean Absolute Error
.br
mse (uint, default: 0, minmax: 0,100): scene diff threshold using Mean Square Error
.br
lw (dbl, default: 0.0):        line width between images in pixels
.br
lc (str, default: white):      line color
.br
clear (str, default: white):   clear color
.br
snap (dbl, default: -1):       duration between images, 0 for all images
.br
maxsnap (dbl, default: -1):    maximum duration between two thumbnails when scene change detection is enabled
.br
pfmt (pfmt, default: rgb):     output pixel format
.br
txt (str, default: ):          text to insert per thumbnail
.br
tc (str, default: white):      text color
.br
tb (str, default: black):      text shadow
.br
font (str, default: SANS):     font to use
.br
fs (dbl, default: 10):         font size to use in percent of scaled height
.br
tv (dbl, default: 0):          text vertical position in percent of scaled height
.br
thread (sint, default: -1):    number of threads for software rasterizer, -1 for all available cores
.br
blt (bool, default: true):     use blit instead of software rasterizer
.br
scref (bool, default: false):  use last inserted image as reference for scene change detection
.br
dropfirst (bool, default: false): drop first image
.br
list (str, default: null):     export json list of frame times and positions to given file
.br
lxy (bool, default: false):    add explicit x and y in json export
.br

.br
.SH txtgen
.LP
.br
Description: Text Generator
.br
Version: 1.0
.br
Author: GPAC Team
.br

.br
This filter generates text streams based on the provided .I src file. By default, the filter uses a lorem ipsum text file
.br
The .I type parameter sets the text generation mode. If set to 'txt', the filter will generate text based on the source file
.br
If set to 'utc', the filter will generate text based on the current UTC time. If set to 'ntp', the filter will generate text based on the current NTP time
.br
When the .I unit is set to 'w', the filter will generate text based on words. When set to 'l', the filter will generate text based on lines
.br
The .I fdur parameter sets the frame duration of the text stream. Total duration of the text stream is set by the .I dur parameter. If set to 0/0, the text stream will be infinite
.br
The .I rollup parameter enables roll-up mode up to the specified number of lines. In roll-up mode, the filter will accumulate text until the specified number of lines is reached.
.br
When the number of lines is reached, the filter will remove the first line and continue accumulating text
.br
You would use .I rollup in combination with .I unit set to 'l' to create a roll-up subtitle effect. Or set .I unit to 'w' to create a roll-up text effect.
.br
The .I lmax parameter sets the maximum number of characters in a line. If the line in the source file is longer than this, the excess text will be wrapped. 0 means no limit
.br
When .I rt is set to true, the filter will generate text in real-time. If set to false, the filter will generate text as fast as possible
.br

.br
.SH Options (expert):
.LP
.br
src (str, default: /usr/local/share/gpac/scripts/jsf/txtgen/lipsum.txt): source of text. If not set, the filter will use lorem ipsum text
.br
type (enum, default: txt):     type of text to generate
.br
* txt: plain text (uses src option)
.br
* utc: UTC time
.br
* ntp: NTP time
.br

.br
unit (enum, default: l):       minimum unit of text from the source
.br
* w: word
.br
* l: line
.br

.br
fdur (frac, default: 1/1):     duration of each frame
.br
lmax (uint, default: 32):      maximum number of characters in a line. If the line in the source file is longer than this, the excess text will be wrapped. 0 means no limit
.br
dur (frac, default: 0/0):      duration of the text stream
.br
rollup (uint, default: 0):     enable roll-up mode up to the specified number of lines
.br
lock (bool, default: false):   lock timing to text generation
.br
rt (bool, default: true):      real-time mode
.br

.br
.SH mediaserver
.LP
.br
Description: Media Server
.br
Version: 1.0
.br
Author: GPAC team - (c) Telecom Paris 2024 - license LGPL v2
.br

.br
This filter is an HTTP server and proxy for GET and HEAD requests supporting Multicast ABR sources.
.br

.br
This filter does not produce PIDs, it attaches to HTTP output filter.
.br
If no HTTP output filter is specified in the session, the filter will create one.
.br
The file .gpac_auth, if present in current working directory, will be used for authentication unless --rdirs is set.
.br

.br
If more options need to be specified for the HTTP output filter, they can be passed as local options or using global options:
.br
.br
gpac mediaserver:cors=on --user_agent=MyUser
.br

.br

.br
Although not recommended, a server may be specified explicitly:
.br
.br
gpac mediaserver httpout:OPTS
.br

.br
In this case, the first httpout filter created will be used.
.br

.br
Default request handling of httpout filter through read / write directories is disabled.
.br

.br
.SH Services Configuration
.LP
.br
The service configuration is set using .I scfg. It shall be a JSON file containing a single array of services.
.br
Each service is a JSON object with one or more of the following properties:
.br
* id: (string, default null) Service identifier used for logs
.br
* active: (boolean, default true) service is ignored if false
.br
* http: (string, default null) URL of remote service to proxy (either resource name or server path)
.br
* gcache: (boolean, default false) use gpac local disk cache when fetching media from HTTP for this service
.br
* local: (string, default null) local mount point of this service
.br
* keepalive: (number, default 4) remove the service if no request received for the indicated delay in seconds (0 force service to stay in memory forever)
.br
* mabr: (string, default null) address of multicast ABR source for this service
.br
* timeshift: (number, default 10) time in seconds a cached file remains in memory
.br
* unload: (number, default 4 multicast unload policy
.br
* activate: (number, default 1) multicast activation policy
.br
* repair: (boolean, default false) enable unicast repair in MABR stack
.br
* mcache: (boolean, default false) cache manifest files (experimental)
.br
* corrupted: (boolean, default false) forward corrupted files if parsable (valid container syntax, broken media)
.br
* check_ip: (boolean, , default false monitor IP address and port rather than connection when tracking active clients
.br
* noproxy: (boolean) disable proxy for service when local mount point is set. Default is true if both local and http are set, false otherwise
.br
* sources: (array, default null) list of sources objects for file-only services. Each source has the following property:
.br
* name: name as used in resource path,
.br
* url: local or remote URL to use for this resource.
.br
* js: (string, default null) built-in or custom request resolver
.br

.br
Any JSON object with the property comment set will be ignored.
.br

.br
Not all properties are used for each type of service and other properties can be defined by custom request resolvers.
.br

.br
.SH Proxy versus Server
.LP
.br
All services using http option can be exposed by the server without exposing the origin URL, rather than being proxied. To enable this, the local service configuration option must be set to:
.br
- the exposed server path, in which case manifest names are not rewritten
.br
- or the exposed manifest path, in which case manifest names are rewritten, but only one manifest can be exposed (does not work with dual MPD and M3U8 services)
.br

.br
Example
.br
{ 'http': 'https://test.com/live/dash/live.mpd', 'local': '/service1/'}
.br

.br
The server will translate any request /service1/foo/bar.ext into https://test.com/live/dash/foo/bar.ext.
.br

.br
Example
.br
{ 'http': 'https://test.com/live/dash/live.mpd', 'local': '/service1/manifest.mpd'}
.br

.br
The server will translate:
.br
- request /service1/manifest.mpd into https://test.com/live/dash/live.mpd
.br
- any request /service1/foo/bar.ext into https://test.com/live/dash/foo/bar.ext
.br

.br
Note: The URL must point to a self-contained subdirectory of the remote site. Any URLs outside this directory will either fail or be resolved as absolute path on the remote site.
.br

.br
When local is not set, these services are always acting as proxies for the http URL.
.br

.br
When noproxy is explicitly set to false for the services with both http and local, the remote URL will be available as a proxy service as well.
.br

.br
.SH HTTP Proxy and Relay
.LP
.br
The server can act as a proxy for HTTP requests, either for any requests or by domain or resource name.
.br

.br
Service configuration parameters used : http (mandatory), gcache, local.
.br

.br
Configuration for activating proxy for a specific network path:
.br
.br
{ 'http': 'https://test.com/video/'}
.br

.br

.br
Configuration for activating proxy for any network path:
.br
.br
{ 'http': '*'}
.br

.br

.br
Configuration for a relay on a given path:
.br
.br
{ 'http': 'https://test.com/some/path/to/video/', 'local': '/myvids/'}
.br

.br

.br
This will resolve any request http://localhost/myvids/* to https://test.com/some/path/to/video/*
.br

.br
Note: The requests are never cached in memory in this mode, but can be cached on disk if gcache is set.
.br

.br
.SH HTTP Streaming Cache
.LP
.br
The server can act as a cache for live HTTP streaming sessions. The live edge can be cached in memory for a given duration.
.br

.br
Service configuration parameters used : http ( mandatory), timeshift, mcache, gcache, keepalive and local.
.br

.br
Configuration for proxying while caching a live HTTP streaming service:
.br
.br
{ 'http': 'https://test.com/dash/live.mpd', 'timeshift': '30' }
.br

.br

.br
Configuration for relay caching a live HTTP streaming service:
.br
.br
{ 'http': 'https://test.com/dash/live.mpd', 'timeshift': '30', 'local': '/myservice/test.mpd'}
.br

.br

.br
The local service configuration option can be set to:
.br
- the exposed server path, in which case manifest names are not rewritten
.br
- or the exposed manifest path, in which case manifest names are rewritten, but only one manifest can be exposed (does not work with dual MPD and M3U8 services)
.br

.br
.SH Multicast ABR Gateway
.LP
.br
The server can be configured to use a multicast ABR source for an HTTP streaming service, without any HTTP source.
.br

.br
Service configuration parameters used : mabr (mandatory), local (mandatory), corrupted, timeshift and keepalive.
.br

.br
The multicast source can be DVB-MABR (e.g. mabr://235.0.0.1:1234/), ATSC3.0 (e.g. atsc://) or ROUTE (e.g. route://235.0.0.1:1234/).
.br
- If the multicast is replayed from a file, netcap ID shall be set in this multicast URL (e.g. :NCID=N).
.br
- If a specific IP interface is used, it can also be set in multicast URL (e.g. :ifce=IP).
.br

.br
For example, with local set to /service/live.mpd with mabr set, the server will expose the multicast service as http://localhost/service/live.mpd.
.br
The manifest name can be omitted, in which case the exact manifest name used in the broadcast shall be used (and known to the client).
.br

.br
Configuration for exposing a MABR session:
.br
.br
{ 'mabr': 'mabr://234.0.0.1:1234', 'local': '/service1', 'timeshift': '30' }
.br

.br

.br
.SH Multicast ABR Gateway with HTTP cache
.LP
.br
The server can be configured to use a multicast source as an alternate data source of a given HTTP streaming service.
.br

.br
Service configuration parameters used : http (mandatory), mabr (mandatory), local, corrupted, timeshift, repair, gcache, mcache, unload, active, keepalive and js.
.br

.br
The multicast service can be dynamically loaded at run-time using the unload service configuration option:
.br
- if 0, the multicast is started when loading the server and never ended,
.br
- otherwise, the multicast is started dynamically and ended unload seconds after last deactivation.
.br

.br
The qualities in the multicast service can be dynamically activated or deactivated using the activate service configuration option:
.br
- if 0, multicast streams are never deactivated,
.br
- otherwise, a multicast representation is activated only if at least active clients are consuming it, and deactivated otherwise.
.br

.br
The multicast service can use repair options of the MABR stack using repair service configuration option:
.br
- if false, the file will not be sent until completely received (this increases latency),
.br
- otherwise, file data will be pushed as soon as available in order (after reception or repair).
.br

.br
If the corrupted option is set together with repair, HTTP-based repair is disabled and corrupted files are patched using the repair=strict mode of the routein filter.
.br
If files are completely lost, they will be fetched from httpsource.
.br
Warning: This may likely result in decoding/buffering pipeline errors and could fail with some players expecting no timeline holes (such as browsers). GPAC supports this.
.br

.br
The number of active clients on a given quality is computed using the client connection state: any disconnect/reconnect from a client for the same quality will trigger a deactivate+activate sequence.
.br
If check_ip is set to true, the remote IP address+port are used instead of the connection. This however assumes that each client has a unique IP/port which may not always be true (NATs).
.br

.br
If timeshift is 0 for the service, multicast segments will be trashed as soon as not in use (potentially before the client request).
.br

.br
Note: Manifest files coming from multicast are currently never cached.
.br

.br
Configuration for caching a live HTTP streaming service with MABR backup:
.br
.br
{ 'http': 'https://test.com/dash/live.mpd', 'mabr': 'mabr://234.0.0.1:1234', 'timeshift': '30'}
.br

.br

.br
For such services, the custom HTTP header X-From-MABR is defined:
.br
- for client request, a value of no will disable MABR cache for this request; if absent or value is yes, MABR cache will be used if available
.br
- for client response, a value of yes indicates the content comes from the MABR cache; if absent or value is no, the content comes from HTTP
.br

.br
The js option can be set to a JS module exporting the following functions:
.br
* init : (mandatory) The function is called once at the start of the server. Parameters:
.br
  * scfg: the service configuration object
.br
  * return value: must be true if configuration and initialization are successful, false otherwise.
.br

.br
* service_activation : (optional) The function is called when the service is activated or deactivated. Parameters:
.br
  * do_activate (boolean): if true, service is being loaded otherwise it is being unloaded
.br
  * return value: none
.br

.br
* quality_activation : (mandatory) The function is called when the given quality is to be activated service is activated or deactivated. Parameters (in order):
.br
  * do_activate (boolean): if true, quality is being activated otherwise it is being deactivated
.br
  * service_id (integer): ID of the service as announced in the multicast
.br
  * period_id (string): ID of the DASH Period, ignored for HLS
.br
  * adaptationSet_ID (integer): ID of the DASH AdaptationSet, ignored for HLS
.br
  * representation_ID (string): ID of the DASH representation or name of the HLS variant playlist
.br
  * return value: shall be true if activation/deactivation shall proceed and false if activation/deactivation shall be canceled.
.br

.br
.SH File Services
.LP
.br
A file system directory can be exposed as a service.
.br

.br
Service configuration parameters used : local (mandatory), sources (mandatory), gcache and keepalive.
.br

.br
The local service configuration option must be set to the desired service path, and the sources service configuration option must one or more valid sources.
.br
Each source is either a file, a directory or a remote URL.
.br

.br
Configuration for exposing a directory:
.br
.br
{ 'local': '/dserv/', 'sources': [ { 'name': 'foo/', 'url': 'my_dir/' } ] }
.br

.br
This service will expose the content of directory my_dir/* as http://localhost/dserv/foo/*.
.br

.br
In this mode, file serving is handled directly by httpout filter and no memory caching is used.
.br
If the source is a remote HTTP one, the gcache option will indicate if GPAC local cache shall be used.
.br

.br
.SH Module development
.LP
.br

.br
A JS module can be specified using the js option in the service configuration. The module export functions are:
.br
.SS init (mandatory)
.br
The function is called once at the start of the server
.br
Parameter: the service configuration object
.br
return value must be true if configuration and initialization are successful, false otherwise
.br

.br
.SS resolve (mandatory)
.br
Parameter: an HTTP request object from GPAC
.br

.br
The function returns an array of two values [result, delay]:
.br
* result: null if error, a resolved string indicating either a local file or the reply body, or an object
.br
* delay: if true, the reply is being delayed by the module for later processing
.br

.br
When an object is returned, the request is handled by the JS module in charge of sending the reply and reading the data. The object shall have the following properties:
.br
* read: same semantics as the request read method
.br
* on_close: optional function called when the request is closed
.br

.br
.SH Built-in modules
.LP
.br

.br
.SS Source Remultiplexer
.br
Module is loaded when using js=remux
.br

.br
This module remultiplexes the source files in a desired format without transcoding.
.br

.br
Service configuration parameters used : local (mandatory), sources (mandatory).
.br

.br
Service configuration additional parameters
.br
* fmt: default format to use (default is mp4). Supported formats are:
.br
  * `src`: no remultiplexing
.br
  * `mp4`: fragmented MP4
.br
  * `ts`: MPEG-2 TS
.br
  * `gsf`: GPAC streaming format
.br
  * `dash`: MPEG-DASH format, single quality
.br
  * `hls`: HLS format, single quality
.br

.br
Sources are described using the sources array in the service configuration.
.br

.br
CGI parameters for request are:
.br
* fmt: (string, same as service configuration fmt) multiplexing format. If set to src, all other CGI parameters are ignored.
.br
* start: (number, default 0) start time in second of re-multiplexed content.
.br
* speed: (number, default 1) speed (>=0), keep video stream only and remove non SAP frames.
.br
* media: (string, default av) media filtering type
.br
  * 'av': keep both audio and video
.br
  * 'a': keep only audio
.br
  * 'v': keep only video
.br

.br
Configuration for serving a directory with remultiplexing to mp4:
.br
.br
{'local': '/service1/', 'js': 'remux', 'sources': ['name': 'vids', 'url': '/path/to/vids/'}], 'fmt': 'mp4'}
.br

.br

.br
.SH Options (expert):
.LP
.br
scfg (str):                    service configuration file
.br
quit (bool, default: false):   exit server once last service has been deactivated
.br

.br
.SH avmix
.LP
.br
Description: Audio Video mixer
.br
Author: GPAC team
.br

.br
AVMix is an audio video mixer controlled by an updatable JSON playlist format. The filter can be used to:
.br
- schedule video sequence(s) over time
.br
- mix videos together
.br
- layout of multiple videos
.br
- overlay images, text and graphics over source videos
.br

.br
All input streams are decoded prior to entering the mixer.
.br
- audio streams are mixed in software
.br
- video streams are composed according to the gpu option
.br
- other stream types are not yet supported
.br

.br
OpenGL hardware acceleration can be used, but the supported feature set is currently not the same with or without GPU.
.br

.br
In software mode, the mixer will detect whether any of the currently active video sources can be used as a base canvas for the output to save processing time.
.br
The default behavior is to do this detection only at the first generated frame, use dynpfmt to modify this.
.br

.br
The filter can be extended through JavaScript modules. Currently only scenes and transition effects use this feature.
.br

.br
.SH Live vs offline
.LP
.br

.br
When operating offline, the mixer will wait for video frames to be ready for 10 times lwait. After this timeout, the filter will abort if no input is available.
.br
This implies that there shall always be a media to compose, i.e. no "holes" in the timeline.
.br
Note: The playlist is still refreshed in offline mode.
.br

.br
When operating live, the mixer will initially wait for video frames to be ready for lwait seconds. After this initial timeout, the output frames will indicate:
.br
- 'No signal' if no input is available (no source frames) or no scene is defined
.br
- 'Signal lost' if no new input data has been received for lwait on a source
.br

.br
.SH Playlist Format
.LP
.br
.SS Overview
.br
The main components in a playlist are:
.br
* Media sources and sequences: each source is described by one or more URL to the media data, and each sequence is a set of sources to be played continuously 
.br
* Transitions: sources in a sequence can be combined using transitions
.br
* Scenes: a scene describes one graphical object to put on screen and if and how input video are mapped on objects
.br
* Groups: a group is a hierarchy of scenes and groups with positioning properties, and can also be used to create offscreen images reused by other elements
.br
* Timers: a timer can be used to animate scene parameters in various fashions
.br

.br
The playlist content shall be either a single JSON object or an array of JSON objects, hereafter called root objects.
.br
Root objects types can be indicated through a type property:
.br
* seq: a sequence object
.br
* url: a source object (if used as root, a default sequence object will be created)
.br
* scene: a scene object
.br
* group: a group object
.br
* timer: a timer object
.br
* script: a script object
.br
* config: a config object
.br
* watch: a watcher object
.br
* style: a style object
.br

.br
Except for style, the type property of root objects is usually not needed as the parser guesses the object types from its properties.
.br

.br
A root object with a property skip set to anything but 0 or false is ignored.
.br
Within a group hierarchy, any scene or group object with a property skip set to anything but 0 or false is ignored.
.br

.br
Any unrecognized property not starting with _ will be reported as warning.
.br

.br
.SS Colors
.br
Colors are handled as strings, formatted as:
.br
- the DOM color name (see gpac -h colors)
.br
- HTML codes $RRGGBB or #RRGGBB
.br
- RGB hex vales 0xRRGGBB
.br
- RGBA hex values 0xAARRGGBB
.br
- the color none is 0x00000000, its signification depends on the object using it.
.br

.br
If JS code needs to manipulate colors, use sys.color_lerp and sys.color_component functions.
.br

.br
.SS JS Hooks
.br

.br
Some object types allow for custom JS code to be executed. 
.br
The script code can either be the value of the property, or located in a file indicated in the property. 
.br
The code is turned into a function (i.e. new Function(args, js_code)) upon initial playlist parsing or reload, hereafter called JSFun.
.br
The JSFun arguments and return value are dependent on the parent object type.
.br
The parent object is exposed as this in JSFun and can be used to store context information for the JS code.
.br

.br
The code can use the global functions and modules defined, especially:
.br
* sys: GPAC system module
.br
* evg: GPAC EVG module
.br
* os: QuickJS OS module 
.br
* video_playing: video playing state
.br
* audio_playing: audio playing state
.br
* video_time: output video time
.br
* video_timescale: output video timescale
.br
* video_width: output video width
.br
* video_height: output video height
.br
* audio_time: output audio time
.br
* audio_timescale: output audio timescale
.br
* samplerate: output audio samplerate
.br
* channels: output audio channels
.br
* current_utc_clock: current UTC clock in ms
.br
* get_media_time: gets media time of output (no argument) or of source with id matching the first argument. Return
.br
  * -4: not found
.br
  * -3: not playing
.br
  * -2: in prefetch
.br
  * -1: timing not yet known
.br
  * value: media time in seconds (float)
.br
* resolve_url: resolves URL given in first argument against media playlist URL and returns the resolved url (string)
.br
* get_scene(id): gets scene with given ID
.br
* get_group(id): gets group with given ID
.br
* mouse_over(evt): returns scene under mouse described by a GPAC event, or null if no scene (picking for scenes with perspective projection is not supported)
.br
* mouse_over(x, y): returns scene under coordinates {x, y} in pixels, {0,0} representing the center of the frame, x axis oriented towards the right and y axis oriented towards the top
.br

.br
Scene and group options must be accessed through getters and setters:
.br
* scene.get(prop_name): gets the scene option
.br
* scene.set(prop_name, value): sets the scene option
.br
* group.get(prop_name): gets the group option
.br
* group.set(prop_name, value): sets the group option
.br

.br
Warning: Results are undefined if JS code modifies the scene/group objects in any other way.
.br

.br
Other playlist objects (as well as scene and group objects) can be queried using query_element(ID, propName) or modified using update_element(ID, propName, value) (see playlist update below).   
.br

.br
Warning: There is no protection of global variables and state, write your script carefully!
.br

.br
Additionally, scripts executed within scene modules can modify the internal playlist using:
.br
* remove_element(ID):  removes a scene, group, sequence, timer, script or watcher with given ID from playlist
.br
* parse_element(JSON): parses a root playlist element and add it to the current playlist
.br
* parse_scene(JSON, parent): parses a scene and add it to parent group if not null or root otherwise
.br
* parse_group(JSON, parent): parses a group and add it to parent group if not null or root otherwise
.br
* reload_playlist(JSON): parses a new playlist (an empty JSON array will reset the playlist). If the calling scene is no longer in the resulting scene tree, it will be added to the root of the scene tree.
.br

.br
All these playlist-related functions must be called within the update() callback of the scene module.
.br

.br
.SS Sequences
.br
.P
.B
Properties for sequence objects:
.br
 * id (null): sequence identifier
.br
 * loop (0): number of loops for the sequence (0 means no loop, -1 will loop forever)
.br
 * start (0): sequence start time (see notes). If negative, the sequence is not active
.br
 * stop (0): sequence stop time (see notes). If less than start, the sequence will stop only when over
.br
 * transition (null): a transition object to apply between sources of the sequence
.br
 * seq ([]): array of one or more source objects
.br

.br
.P
.B
Notes
.br
Media source timing does not depend on the media being used by a scene or not, it is only governed by the sequence parameters.
.br
This means that a sequence not used by any active scene will not be rendered (video nor audio).
.br

.br
The syntax for start and  stop fields is:
.br
* `now`: resolves to current UTC clock in live mode, and to 0 for non-live mode
.br
* date: converted to UTC date in live mode, and to 0 for non-live mode
.br
* N: converted to current utc clock (or 0 for non-live mode) plus N seconds UTC
.br
* "N": converted to current utc clock (or 0 for non-live mode) plus N seconds UTC
.br

.br
In 'live' mode, if start is set using a UTC date, the sequence will have a start range equal to MAX(current_UTC - start_in_UTC, 0). Some sources may be skipped to fulfill this condition.
.br
This allows different instances of the filter using the same playlist to initialize media time in the same fashion.
.br

.br
When reloading the playlist:
.br
- if the sequence is active, start value is ignored 
.br
- if the sequence was not started, start value is updated 
.br
- if the sequence was over, start value is updated only of greater than previous resolved UTC start time. 
.br

.br
.SS Sources
.br
.P
.B
Properties for source objects
.br
* id (null): source identifier, used when reloading the playlist
.br
* src ([]): list of sourceURL describing the URLs to play. Multiple sources will be played in parallel
.br
* start (0.0): media start time in source
.br
* stop (0.0): media stop time in source, ignored if less than or equal to start
.br
* mix (true): if true, apply sequence transition or mix effect ratio as audio volume. Otherwise volume is not modified by transitions.
.br
* fade ('inout'): indicate how audio should be faded at stream start/end:
.br
  * in: audio fade-in when playing first frame
.br
  * out: audio fade-out when playing last frame
.br
  * inout: both fade-in and fade-out are enabled
.br
  * other: no audio fade
.br
* keep_alive (false): if using a dedicated gpac process for one or more input, relaunch process(es) at source end if exit code is greater than 2 or if not responding after rtimeout
.br
* seek (false): if true and keep_alive is active, adjust start according to the time elapsed since source start when relaunching process(es)
.br
* prefetch (500): prefetch duration in ms (play before start time of source), 0 for no prefetch
.br
* hold (false): if media duration is known and media stop time is greater than media duration, activate no signal mode until desired stop time is reached (disable transition), otherwise move to next source at end of stream
.br

.br
.SS Source Locations
.br
.P
.B
Properties for sourceURL objects
.br
* id (null): source URL identifier, used when reloading the playlist
.br
* in (null): input URL or filter chain to load as string. Words starting with - are ignored. The first entry must specify a source URL, and additional filters and links can be specified using @N[#LINKOPT] and @@N[#LINKOPT] syntax, as in gpac
.br
* port (null): input port for source. Possible values are:
.br
  * pipe: launch a gpac process to play the source using GSF format over pipe
.br
  * tcp, tcpu: launch a gpac process to play the source using GSF format over TCP socket (tcp) or unix domain TCP socket (tcpu)
.br
  * not specified or empty string: loads source using the current process
.br
  * other: use value as input filter declaration and launch in as a dedicated process (e.g. in="ffmpeg ..." port="pipe://...")
.br
* opts (null): options for the gpac process instance when using a dedicated gpac process, ignored otherwise
.br
* media ('all'): filter input media by type, a for audio, v for video, t for text (several characters allowed, e.g. av or va), all accept all input media
.br
* raw (true): indicate if input port is decoded AV (true) or compressed AV (false) when using a dedicated gpac process, ignored otherwise
.br

.br
.P
.B
Notes
.br
The special URL scheme ipid:// can be used to locate an input pid by link directives.
.br
Example
.br
in=ipid://#foo=bar
.br

.br
This will use pids having property foo with value bar, regardless of source filter ID.
.br

.br
Example
.br
in=ipid://TEST#foo=bar
.br

.br
This will use pids having property foo with value bar coming from filter with ID TEST.
.br

.br
When using the ipid:// scheme, filter chains cannot be specified (in accepts a single argument) and port is ignored.
.br
The syntax for link directive is the same as in gpac. However, if a listed property is not found on the input pid, the matching will fail.
.br

.br
When launching a child process, the input filter is created first and the child process launched afterwards.
.br

.br
Warning: When launching a child process directly (e.g. in="ffmpeg ..."), any relative URL used in in must be relative to the current working directory.
.br

.br
.SS 2D and 3D transformation
.br
.P
.B
Common properties for group and scene objects
.br
* active (true): indicate if the object is active or not. An inactive object will not be refreshed nor rendered
.br
* x (0): horizontal translation
.br
* y (0): vertical translation
.br
* cx (0): horizontal coordinate of rotation center
.br
* cy (0): vertical coordinate of rotation center
.br
* units ('rel'): unit type for x, y, cx, cy, width and height. Possible values are:
.br
  * rel: units are expressed in percent of current reference (see below)
.br
  * pix: units are expressed in pixels
.br
* rotation (0): rotation angle of the scene in degrees
.br
* hscale (1): horizontal scaling factor to apply to the group
.br
* vscale (1): vertical skewing factor to apply to the scene
.br
* hskew (0): horizontal skewing factor to apply to the scene
.br
* vskew (0): vertical skewing factor to apply to the scene
.br
* zorder (0): display order of the scene or of the offscreen group (ignored for regular groups)
.br
* untransform (false): if true, reset parent tree matrix to identity before computing matrix
.br
* mxjs (null): JS code for matrix evaluation
.br
* z (0): depth translation
.br
* cz (0): depth coordinate of rotation center
.br
* zscale (1): depth scaling factor to apply to the group
.br
* orientation ([0, 0, 1, 0]): scale along the given orientation axis [x, y, z, angle] - see VRML scaleOrientation
.br
* axis ([0, 0, 1]): rotation axis
.br
* position ([0, 0, auto]): camera location
.br
* target ([0, 0, 0]): point where the camera is looking
.br
* up ([0, 1, 0]): camera up vector
.br
* viewport ([0, 0, 100, 100]): viewport for camera
.br
* fov (45): field of view in degrees
.br
* ar (0): camera aspect ratio, 0 means default
.br
* znear (0): near Z plane distance, 0 means default
.br
* zfar (0): far Z plane distance, 0 means default
.br

.br
.P
.B
Coordinate System
.br
Each group or scene is specified in a local coordinate system for which:
.br
- {0,0} represents the center
.br
- X values increase to the right
.br
- Y values increase to the top
.br
- Z values increase  towards the eye of a viewer (Z=X^Y)
.br

.br
The 2D local transformation matrix is computed as rotate(cx, cy, rotation) * hskew * vskew * scale(hscale, vscale) * translate(x, y).
.br
The 3D local transformation matrix is computed as translate(x, y, z) * rotate(cx, cy, cz, rotation) * scale(hscale, vscale, zscale). Skewing is not supported for 3D.
.br

.br
The default unit system (rel) is relative to the current established reference space:
.br
- by default, the reference space is {output_width, output_height}, the origin {0,0} being the center of the output frame 
.br
- any group with reference=true, width>0 and height>0 establishes a new reference space {group.width, group.height}
.br

.br
Inside a reference space R, relative coordinates are interpreted as follows:
.br
- For horizontal coordinates, 0 means center, -50 means left edge (-R.width/2), 50 means right edge (+R.width/2).
.br
- For vertical coordinates, 0 means center, -50 means bottom edge (-R.height/2), 50 means top edge (+R.height/2).
.br
- For width, 100 means R.width.
.br
- For height, 100 means R.height.
.br
- For depth (z and cz) coordinates, the value is a percent of the reference height (+R.height).
.br

.br
If width=height, the width is set to the computed height of the object.
.br
If height=width, the height is set to the computed width of the object.
.br
For x property, the following special values are defined:
.br
- y will set the value to the computed y  of the object.
.br
- -y will set the value to the computed -y of the object.
.br
For y property, the following special values are defined:
.br
- x will set the value to the computed x of the object.
.br
- -x will set the value to the computed -x of the object.
.br

.br
Changing reference is typically needed when creating offscreen groups, so that children relative coordinates are resolved against the offscreen canvas size.
.br

.br
The selection between 2D and 3D is done automatically based on z, cz, axis and orientation values.
.br
The default projection is:
.br
- viewport is the entire output frame
.br
- field of view is PI/4 and aspect ratio is output width/height
.br
- zNear is 0.1 and zFar is 10 times maximum(output width, output height)
.br
- camera up direction is Y axis and camera distance is so that a rectangle facing the camera with z=0 and size equal to output size covers exactly the output frame.
.br
- depth buffer is disabled
.br

.br
The default projection can be changed by setting camera properties at group or scene level. When set on a group, all children of the group will use the given camera properties (camera parameters on children are ignored).
.br
The viewport parameter is specified as an array [x, y, w, h], where:
.br
* x: horizontal coordinate of the viewport center, in group or scene units, or 'y' to use y value, or '-y' to use -y value.
.br
* y: vertical coordinate of the viewport center, in group or scene units, or 'x' to use x value, or '-x' to use -x value.
.br
* w: width of the viewport, in group or scene units, or 'height' to use h value.
.br
* h: height of the viewport, in group or scene units, or 'width' to use w value.
.br

.br
.P
.B
z-ordering
.br
zorder specifies the display order of the element in the offscreen canvas of the enclosing offscreen group, or on the output frame if no offscreen group in parent tree.
.br
This order is independent of the parent group z-ordering. This allows moving objects of a group up and down the display stack without modifying the groups.
.br

.br
.P
.B
Coordinate modifications through JS
.br
The JSFun specified in mxjs has a single parameter tr.
.br

.br
The tr parameter is an object containing the following variables that the code can modify:
.br
* x, y, z, cx, cy, cz, hscale, vscale, zscale, hskew, vskew, rotation, untransform, axis, orientation: these values are initialized to the current group values in local coordinate system units
.br
* update: if set to true, the object matrix will be recomputed at each frame even if no change in the group or scene parameters (always enforced to true if use is set)
.br
* depth: for groups with use, indicates the recursion level of the used element. A value of 0 indicates this is a direct render of the element, otherwise it is a render through use
.br

.br
The JSFun may return false to indicate that the scene should be considered as inactive. Any other return value (undefined or not false) will mark the scene as active.
.br

.br
Example
.br
"mxjs": "tr.rotation = (get_media_time() % 8) * 360 / 8; tr.update=true;"
.br

.br

.br
.SS Grouping
.br
.P
.B
Properties for group objects
.br
* id (null): group identifier
.br
* scenes ([]): zero or more group or scene objects, cannot be animated or updated
.br
* opacity (1): group opacity
.br
* offscreen ('none'): set group in offscreen mode, cannot be animated or updated. An offscreen mode is not directly visible but can be used in some texture operations. Possible values are:
.br
  * none: regular group
.br
  * mask: offscreen surface is alpha+grey
.br
  * color: offscreen surface is alpha+colors or colors if back_color is set
.br
  * dual: same as color but allows group to be displayed
.br
* scaler (1): when opacity or offscreen rendering is used, offscreen canvas size is divided by this factor (>=1)
.br
* back_color ('none'): when opacity or offscreen rendering is used, fill offscreen canvas with the given color.
.br
* width (-1): when opacity or offscreen rendering is used, limit offscreen width to given value (see below)
.br
* height (-1): when opacity or offscreen rendering is used, limit offscreen height to given value (see below)
.br
* use (null): id of group or scene to re-use
.br
* use_depth (-1): number of recursion allowed for the used element, negative means global max branch depth as indicated by maxdepth
.br
* reverse (false): reverse scenes order before draw
.br
* reference (false): group is a reference space for relative coordinate of children nodes 
.br

.br
.P
.B
Notes
.br
The maximum depth of a branch in the scene graph is maxdepth (traversing aborts after this limit).
.br

.br
In offscreen mode, the bounds of the enclosed objects are computed to allocate the offscreen surface, unless width and height are both greater or equal to 0.
.br
Enforcing offscreen size is useful when generating textures for later effects.
.br

.br
Offscreen rendering is always done in software.
.br

.br
When enforcing scaler>1 on a group with opacity==1, offscreen rendering will be used and the scaler applied.
.br

.br
When enforcing width and height on a group with opacity<1, the display may be truncated if children objects are out of the offscreen canvas bounds.
.br

.br
.SS Scenes
.br
.P
.B
Properties for scene objects
.br
* id (null): scene identifier
.br
* js ('shape'): scene type, either builtin (see below) or path to a JS module, cannot be animated or updated
.br
* sources ([]): list of identifiers of sequences or offscreen groups used by this scene
.br
* width (-1): width of the scene, -1 means reference space width
.br
* height (-1): height of the scene, -1 means reference space height
.br
* mix (null): a transition object to apply if more than one source is set, ignored otherwise
.br
* mix_ratio (-1): mix ratio for transition effect, <=0 means first source only, >=1 means second source only
.br
* volume (1.0): audio volume (0: silence, 1: input volume), this value is not clamped by the mixer.
.br
* fade ('inout'): indicate how audio should be faded at scene activate/deactivate:
.br
  * in: audio fade-in when playing first frame after scene activation
.br
  * out: audio fade-out when playing last frame at scene activation
.br
  * inout: both fade-in and fade-out are enabled
.br
  * other: no audio fade
.br
* autoshow (true): automatically deactivate scene when sequences set in sources are not active
.br
* nosig ('lost'): enable no-signal message for scenes using sequences:
.br
  * no: disable message
.br
  * lost: display message when signal is lost
.br
  * before: display message if source is not yet active
.br
  * all: always display message if source is inactive
.br
* styles ([]): list of style IDs to use
.br
- any other property exposed by the underlying scene JS module.
.br

.br
.P
.B
Notes
.br
Inputs to a scene, whether sequence or offscreen group, must be declared prior to the scene itself.
.br

.br
A default scene will be injected if none is found when initially loading the playlist. If you need to start with an empty output, use a scene with no sequence associated.
.br

.br
If a scene uses one or more sequences and autoshow is not set, the scene will be drawn with no sequence attached if all sequences are inactive (not yet started or over).
.br

.br
.SS Transitions and Mixing effects
.br
.P
.B
JSON syntax
.br
Properties for transition objects:
.br
* id (null): transition identifier
.br
* type: transition type, either builtin (see below) or path to a JS module
.br
* dur: transition duration (transitions always end at source stop time). Ignored if transition is specified for a scene mix.
.br
* fun (null): JS code modifying the ratio effect
.br
- any other property exposed by the underlying transition module.
.br

.br
.P
.B
Notes
.br
A sequence of two media with playback duration (as indicated in source) of D1 and D2 using a transition of duration DT will result in a sequence lasting D1 + D2 - DT.
.br

.br
The JSFun specified by fun takes one argument ratio and must return the recomputed ratio.
.br

.br
Example
.br
"fun": "return ratio*ratio;"
.br

.br

.br
.SS Timers and animations
.br
.P
.B
Properties for timer objects
.br
* id (null): id of the timer
.br
* dur (0): duration of the timer in seconds
.br
* loop (false): loops timer when stop is not set
.br
* pause (false): pause timer
.br
* start (-1): start time (see notes), negative value means inactive
.br
* stop (-1): stop time (see notes), ignored if less than start
.br
* keys ([]): list of keys used for interpolation, ordered list between 0.0 and 1.0
.br
* anims ([]): list of animation objects
.br

.br
.P
.B
Properties for animation objects
.br
* values ([]): list of values to interpolate, there must be as many values as there are keys
.br
* color (false): indicate the values are color (as strings)
.br
* angle (false): indicate the interpolation factor is an angle in degree, to convert to radians (interpolation ratio multiplied by PI and divided by 180) before interpolation
.br
* mode ('linear') : interpolation mode:
.br
  * linear: linear interpolation between the values
.br
  * discrete: do not interpolate
.br
  * other: JS code modifying the interpolation ratio
.br
* postfun (null): JS code modifying the interpolation result
.br
* end ('freeze'): behavior at end of animation:
.br
  * freeze: keep last animated values
.br
  * restore: restore targets to their initial values
.br
* targets ([]): list of strings indicating targets properties to modify. Syntax is:
.br
  * ID@option: modifies property option of object with given ID
.br
  * ID@option[IDX]: modifies value at index IDX of array property option of object with given ID
.br

.br
.P
.B
Notes
.br
Currently, only scene, group, transition and script objects can be modified through timers (see playlist updates).
.br

.br
The syntax for start and  stop fields is:
.br
* `now`: resolves to current UTC clock in live mode, and to 0 for non-live mode
.br
* date: converted to UTC date in live mode, and to 0 for non-live mode
.br
* N: converted to UTC clock at init plus N seconds for timer objects (absolute offset from timeline init)
.br
* "N": converted to current UTC clock plus N seconds (relative offset from current time) with N a positive or negative number
.br

.br
The JSFun specified by mode has one input parameter interp equal to the interpolation factor and must return the new interpolation factor.
.br
Example
.br
"mode":"return interp*interp;" 
.br

.br

.br
The JSFun specified by postfun has two input parameters res (the current interplation result) and interp (the interpolation factor), and must return the new interpolated value.
.br
Example
.br
"postfun": "if (interp<0.5) return res*res; return res;" 
.br

.br

.br
.SS Scripts
.br
.P
.B
Properties for script objects
.br
* id (null): id of the script
.br
* script (null): JavaScript code or path to JavaScript file to execute, cannot be animated or updated
.br
* active (true): indicate if script is active or not
.br

.br
.P
.B
Notes
.br

.br
Script objects allow read and write access to the playlist from script. They currently can only be used to modify scenes and groups and to activate/deactivate other scripts.
.br

.br
The JSFun function specified by fun has no input parameter. The return value (default 0) is the number of seconds (float) to wait until next evaluation of the script.
.br

.br
Example
.br
{ "script": "let s=get_scene('s1'); let rot = s.get('rotation'); rot += 10; s.set('rotation', rot); return 2;" }
.br

.br
This will change scene s1 rotation every 2 seconds 
.br

.br
.SS Watchers
.br
.P
.B
Properties for watcher objects
.br
* id (null): ID of the watcher
.br
* active (true): indicate if watcher is active or not
.br
* watch (""): element watched, formatted as ID@prop, with ID the element ID and prop the property name to watch
.br
* target (""): action for watcher. Allowed syntaxes are:
.br
  * `ID@prop`, `ID@prop[idx]`: copy value to property prop of the element ID (potentially at index idx if specified for arrays)
.br
  * `ID.fun_name`: call function fun_name exported from scene module ID, using three arguments ['value', 'watchID', 'watchPropName'], no return value check
.br
  * otherwise: action must be JS code, and the resulting JSFun has one argument value containing the watched value, and no return value check
.br
* with (undefined): for targets in the form ID@prop, use this value instead of the watched value
.br

.br
.P
.B
Notes
.br

.br
A watcher can be used to monitor changes in an object in the playlist.
.br
Any object property that can be animated or updated can be monitored by a watcher.
.br

.br
In addition, the following virtual properties (cannot be read or write) can be watched:
.br
* sequence.active: value is set to true when sequence is activated, and false when deactivated
.br
* source.active: value is set to true when source playback starts, and false when source playback stops
.br
* timer.active: value is set to true when timer starts, and false when timer stops
.br

.br
Only the active property can be animated or updated in a watcher.
.br

.br
Example
.br
{'watch': 's1@rotation', 'target': 's2@rotation'}
.br

.br
This will copy s1.rotation to s2.rotation.
.br

.br
Example
.br
{'watch': 's1@rotation', 'target': 'get_scene('s2').set('rotation', -value); }
.br

.br
This will copy the -1*s1.rotation to s2.rotation.
.br

.br
.P
.B
Watching UI events
.br

.br
Watchers can also be used to monitor GPAC user events by setting watch to:
.br
- an event name to monitor, one of keydown, keyup, mousemove, mouseup, mousedown, wheel, textInput
.br
- events to monitor all events (including internal events).
.br

.br
For keyup and keydown events, the key code to watch may additionally be given in parenthesis, e.g. 'watch': 'keyup(T)'.
.br

.br
Note: User events are only sent if the output of the filter is consumed by the vout filter.
.br

.br
When event monitoring is used, the target must be a javascript callback (i.e. it cannot be ID@prop).
.br
The javascript function will be called with a single argument evt containing the GPAC event.
.br

.br
Example
.br
{'watch': 'mousemove', 'target': 'let s = mouse_over(evt); get_scene('s2').set('fill', (s && (s.id=='s1') ? 'white' : 'black' );'}
.br

.br
This will set s1 fill color to white of mouse is over s2 and to black otherwise.
.br

.br
.SS Styles
.br
.P
.B
Properties for style objects
.br
* id (null): ID of the style
.br
* forced (false): always apply style even when no modifications
.br
* other: any property to share between scene
.br

.br
.P
.B
Notes
.br

.br
A style object allows scenes to share the same values for a given set of properties.
.br

.br
If a scene property has the same name as a style property, the scene property is replaced by the style property.
.br
Styles only apply to scene properties as follows:
.br
- volume, fade, mix_ratio can use style
.br
- all options defined by the scene module can use style
.br
- transformation or other scene properties cannot use style
.br

.br
Properties of a style object can be animated or updated, but a style object cannot be watched.
.br

.br
Styles are applied to each associated scene in order of declaration, e.g. ['st1', 'st2'] and ['st2', 'st1'] will likely give different results.
.br

.br
If force is not set for a style, the style is only applied after being modified (load, animation, update); if a scene uses ['st1', 'st2'] and only st1 is
.br
modified (animation, update), st2 will only be applied once.
.br

.br
.SS Filter configuration
.br
The playlist may specify configuration options of the filter, using a root object of type 'config':
.br
- property names are the same as the filter options
.br
- property values are given in the native type, or as strings for fractions (format N/D), vectors (format WxH) or enums
.br
- each declared property overrides the filter option of the same name (whether default or set at filter creation)
.br

.br
A configuration object in the playlist is only parsed when initially loading the playlist, and ignored when reloading it.
.br

.br
The following additional properties are defined for testing:
.br
* reload_tests([]): list of playlists to reload
.br
* reload_timeout(1.0): timeout in seconds before playlist reload
.br
* reload_loop (0): number of times to repeat the reload tests (not including original playlist which is not reloaded)
.br

.br
.SS Playlist modification
.br
The playlist file can be modified at any time.
.br
Objects are identified across playlist reloads through their id property.
.br
Objects that are not present after reloading a playlist are removed from the mixer. This implies that reloading a playlist will recreate most objects with no ID associated.
.br

.br
A sequence object modified between two reloads is refreshed, except for its start field if sequence active.
.br

.br
A source object shall have the same parent sequence between two reloads. Any modification on the object will only be taken into consideration when (re)loading the source.
.br

.br
A sourceURL object is not tracked for modification, only evaluated when activating the parent source object.
.br

.br
A scene or group object modified between two reloads is notified of each changed value.
.br

.br
A timer object modified between two reloads is shut down and restarted. Consequently, animation objects are not tracked between reloads.
.br

.br
A transition object may change between two reloads, but any modification on the object will only be taken into consideration when restarting the effect.
.br

.br
A script object modified between two reloads has its code re-evaluated
.br

.br
A watcher object modified between two reloads has its watch source and code re-evaluated
.br

.br
A style object is not tracked (all styles are reloaded when reloading a playlist).
.br

.br
.SS Playlist example
.br

.br
The following is an example playlist using a sequence of two videos with a mix transition and an animated video area:
.br

.br
Example
.br
[
.br
 {"id": "seq1", "loop": -1, "start": 0,  "seq":
.br
  [
.br
   { "id": "V1", "src": [{"in": "s1.mp4"}], "start": 60, "stop": 80},
.br
   { "id": "V2", "src": [{"in": "s2.mp4"}], "stop": 100}
.br
  ],
.br
  "transition": { "dur": 1, "type": "mix"}
.br
 },
.br
 {"id": "scene1", "sources": ["seq1"]},
.br
 {"start": 0, "dur": 10, "keys": [0, 1], "anims":
.br
  [
.br
   {"values": [50, 0],  "targets": ["scene1@x", "scene1@y"]},
.br
   {"values": [0, 100],  "targets": ["scene1@width", "scene1@height"]}
.br
  ]
.br
 }
.br
]
.br

.br

.br
.SH Updates Format
.LP
.br

.br
Updates can be sent to modify the playlist, rather than reloading the entire playlist.
.br
Updates are read from a separate file specified in updates, inactive by default.
.br

.br
Warning: The updates file is only read when modified AFTER the initialization of the filter.
.br

.br
The updates file content shall be either a single JSON object or an array of JSON objects.
.br
The properties of these objects are:
.br
* skip: if true or 1, ignores the update, otherwise apply it
.br
* replace: string identifying the target replacement. Syntax is:
.br
  * ID@name: indicate property name of element with given ID to replace
.br
  * ID@name[idx]: indicate the index in the property name of element with given ID to replace
.br
* with: replacement value, must be of the same type as the target value.
.br

.br
An id property cannot be updated.
.br

.br
The following playlist elements of a playlist can be updated:
.br
* scene: all properties except js and read-only module properties
.br
* group: all properties except scenes and  offscreen
.br
* sequence: start, stop, loop and transition properties
.br
* timer: start, stop, loop, pause and dur properties
.br
* transition: all properties
.br
  * for sequence transitions: most of these properties will only be updated at next reload
.br
  * for active scene transitions: whether these changes are applied right away depend on the transition module
.br

.br
Example
.br
[
.br
 {"replace": "scene1@x", "with": 20},
.br
 {"replace": "seq1@start", "with": "now"}
.br
]
.br

.br

.br
.SH Scene modules
.LP
.br
.SS Scene clear
.br
This scene clears the canvas area covered by the scene with a given color. 
.br

.br
The default clear color of the mixer is black.
.br

.br
The clear area is always axis-aligned in output frame, so when skew/rotation are present, the axis-aligned bounding box of the transformed scene area will be cleared.
.br

.br
Options:
.br
* color ('none'): clear color
.br
.SS Scene clip
.br
This scene resets the canvas clipper or sets the canvas clipper to the scene area.
.br

.br
The clipper is always axis-aligned in output frame, so when skew/rotation are present, the axis-aligned bounding box of the transformed clipper will be used.
.br

.br
Clippers are handled through a stack, resetting the clipper pops the stack and restores previous clipper.
.br
If a clipper is already defined when setting the clipper, the clipper set is the intersection of the two clippers.
.br

.br
Options:
.br
* reset (false): if set, reset clipper otherwise set it to scene position and size
.br
* stack (true): if false, clipper is set/reset independently of the clipper stack (no intersection, no push/pop of the stack)
.br
.SS Scene mask
.br
This scene sets the canvas alpha mask mode.
.br

.br
The canvas alpha mask is always full screen.
.br

.br
In software mode, combining mask effect in record mode and reverse group drawing allows drawing front to back while writing pixels only once.
.br

.br
Options:
.br
* mode ('off'): if set, reset clipper otherwise set it to scene position and size
.br
  * off: mask is disabled
.br
  * on: mask is enabled and cleared, further draw operations will take place on mask
.br
  * onkeep: mask is enabled but not cleared, further draw operations will take place on mask
.br
  * use: mask is enabled, further draw operations will be filtered by mask
.br
  * use_inv: mask is enabled, further draw operations will be filtered by 1-mask
.br
  * rec: mask is in record mode, further draw operations will be drawn on output and will set mask value to 0 
.br
 
.br
.SS Scene shape
.br
This scene can be used to setup a shape, its outline and specify the fill and strike modes.
.br
Supported shapes include:
.br
- a variety of rectangles, ellipse and other polygons
.br
- custom paths specified from JS
.br
- text
.br

.br
The color modes for shapes and outlines include:
.br
- texturing using data from input media streams (shape fill only)
.br
- texturing using local JPEG and PNG files (shape fill only)
.br
- solid color
.br
- linear and radial gradients
.br

.br
The default scene is optimized to fallback to fast blit when no transformations are used on a straight rectangle shape.
.br

.br
All options can be updated at run time.
.br

.br
The module accepts 0, 1 or 2 sequences as input.
.br

.br
Color replacement operations can be specified for base scenes using source videos by specifying the replace option. The replacement source is:
.br
- the image data if img is set, potentially altered using *_rep options
.br
- otherwise a linear gradient if fill=linear or a radial gradient if fill=radial (NOT supported in GPU mode, use an offscreen group for this).
.br

.br
Warning: Color replacement operations cannot be used with transition or mix effects.
.br

.br
.SS Text options 
.br

.br
Text can be loaded from file if text[0] is an existing local file.
.br
By default all lines are loaded. The number of loaded lines can be specified using text[1] as follows:
.br
* 0 or not present: all lines are loaded
.br
* N > 0: only keep the last N lines
.br
* N < 0: only keep the first N lines
.br

.br
Text loaded from file will be refreshed whenever the file is modified.
.br

.br
Predefined keywords can be used in input text, identified as $KEYWORD$. The following keywords (case insensitive) are defined:
.br
* time: replaced by UTC date
.br
* ltime: replaced by locale date
.br
* date: replaced by date (Y/M/D)
.br
* ldate: replaced by locale date (Y/M/D)
.br
* mtime: replaced by output media time 
.br
* mtime_SRC: replaced by media time of input source SRC 
.br
* cpu: replaced by current CPU usage of process
.br
* mem: replaced by current memory usage of process
.br
* version: replaced by GPAC version
.br
* fversion: replaced by GPAC full version
.br
* P4CC, PropName: replaced by corresponding PID property
.br

.br
.SS Custom paths
.br

.br
Custom paths (shapes) can be created through JS code indicated in 'shape', either inline or through a file.
.br
The following GPAC JS modules are imported:
.br
 - Sys as sys
.br
 - All EVG as evg
.br
 - os form QuickJS
.br

.br
See https://doxygen.gpac.io for more information on EVG and Sys JS APIs.
.br

.br
The code is exposed the scene as this. The variable this.path is created, representing an empty path.
.br
Example
.br
"shape": "this.path.add_rectangle(0, 0, this.width, this.height); let el = new evg.Path().ellipse(0, 0, this.width, this.height/3); this.path.add_path(el);"
.br

.br

.br
The default behaviour is to use the shape width and height as reference size for texture mapping.
.br
If your custom path is textured, with bounding rectangle size different from the indicated shape size, set the variable this.tx_adjust to true.
.br

.br
In the previous example, the texture mapping will not be impacted by the custom path size.
.br

.br
Example
.br
"shape": "this.path.add_rectangle(0, 0, this.width, this.height); let el = new evg.Path().ellipse(0, 0, this.width, this.height/3); this.path.add_path(el); this.tx_adjust = true;"
.br

.br
In this example, the texture mapping will be adjusted to the desired size.
.br

.br
The global variables and functions are available (c.f. gpac -h avmix:global):
.br
 * get_media_time(): return media time in seconds (float) of output
.br
 * get_media_time(SRC): get time of source with id SRC, return -4 if not found, -3 if not playing, -2 if in prefetch, -1 if timing not yet known, media time in seconds (float) otherwise
.br
 * current_utc_clock: current UTC time in ms
.br
 * video_time: output video time
.br
 * video_timescale: output video timescale
.br
 * video_width: output video width
.br
 * video_height: output video height
.br

.br
If your path needs to be reevaluated on regular basis, set the value this.reload to the timeout to next reload, in milliseconds.
.br

.br
Options:
.br
* rx (0): horizontal radius for rounded rect in percent of object width if positive, in absolute value if negative, value y means use ry
.br
* ry (0): vertical radius for rounded rect in percent of object height if positive, in absolute value if negative, value x means use rx
.br
* tl (1): top-left corner scaler (positive, 0 disables corner)
.br
* bl (1): bottom-left corner scaler (positive, 0 disables corner)
.br
* tr (1): top-right corner scaler (positive, 0 disables corner)
.br
* br (1): bottom-right corner scaler (positive, 0 disables corner)
.br
* rs (false): repeat texture horizontally
.br
* rt (false): repeat texture vertically
.br
* keep_ar (true): keep aspect ratio
.br
* pad_color ('0x00FFFFFF'): color to use for texture padding if rs or rt are false. Use none to use texture edge, 0x00FFFFFF for transparent (always enforced if source is transparent)
.br
* txmx ([]): texture matrix - all 6 coefficients must be set, i.e. [xx xy tx yx yy ty]
.br
* cmx ([]): color transform - all 20 coefficients must be set in order, i.e. [Mrr, Mrg, Mrb, Mra, Tr, Mgr, Mgg ...]
.br
* line_width (0): line width in percent of width if positive, or absolute value if negative
.br
* line_color ('white'): line color, linear for linear gradient and radial for radial gradient
.br
* line_pos ('center'): line/shape positioning. Possible values are:
.br
  * center: line is centered around shape
.br
  * outside: line is outside the shape
.br
  * inside: line is inside the shape
.br
* line_dash ('plain'): line dashing mode. Possible values are:
.br
  * plain: no dash
.br
  * dash: predefined dash pattern is used
.br
  * dot:  predefined dot pattern is used
.br
  * dashdot:  predefined dash-dot pattern is used
.br
  * dashdashdot:  predefined dash-dash-dot pattern is used
.br
  * dashdotdot:  predefined dash-dot-dot pattern is used
.br
* dashes ([]): dash/dot pattern lengths for custom dashes (these will be multiplied by line size)
.br
* cap ('flat'): line end style. Possible values are:
.br
  * flat: flat end
.br
  * round: round end
.br
  * square: square end (extends limit compared to flat)
.br
  * triangle: triangle end
.br
* join ('miter'): line joint style. Possible values are:
.br
  * miter: miter join (straight lines)
.br
  * round: round join
.br
  * bevel: bevel join
.br
  * bevelmiter: bevel+miter join
.br
* miter_limit (2): miter limit for joint styles
.br
* dash_length (-1): length of path to outline, negative values mean full path
.br
* dash_offset (0): offset in path at which the outline starts
.br
* blit (true): use blit if possible, otherwise EVG texturing. If disabled, always use texturing
.br
* fill ('none'): fill color if used without sources, linear for linear gradient and radial for radial gradient
.br
* img (''): image for scene without sources or when replace is set. Accepts either a path to a local image (JPG or PNG), the ID of an offscreen group or the ID of a sequence
.br
* alpha (1): global texture transparency
.br
* replace (''): if img or fill is set and shape is using source, set multi texture option. Possible modes are:
.br
 * a, r, g or b: replace alpha source component by indicated component from img . If prefix - is set, replace by one minus the indicated component
.br
 * m: mix using mix_ratio the color components of source and img and set alpha to full opacity
.br
 * M: mix using mix_ratio all components of source and img, including alpha
.br
 * xC: mix source 1 and source 2 using img component C (a, r, g or b) and force alpha to full opacity
.br
 * XC: mix source 1 and source 2 using img component C (a, r, g or b), including alpha
.br

.br
* shape ('rect'): shape type. Possible values are:
.br
  * rect: rounded rectangle
.br
  * square: square using smaller width/height value
.br
  * ellipse: ellipse
.br
  * circle: circle using smaller width/height value
.br
  * rhombus: axis-aligned rhombus
.br
  * text: force text mode even if text field is empty
.br
  * rects: same as rounded rectangle but use straight lines for corners
.br
  * other value: JS code for custom path creation, either string or local file name (dynamic reload possible)
.br
* grad_p ([]): gradient positions between 0 and 1
.br
* grad_c ([]): gradient colors for each position, as strings
.br
* grad_start ([]): start point for linear gradient or center point for radial gradient
.br
* grad_end ([]): end point for linear gradient or radius value for radial gradient
.br
* grad_focal ([]): focal point for radial gradient
.br
* grad_mode ('pad'): gradient mode. Possible values are:
.br
  * pad: color padding outside of gradient bounds
.br
  * spread: mirror gradient outside of bounds
.br
  * repeat: repeat gradient outside of bounds
.br
* text ([]): text lines (UTF-8 only). If not empty, force shape=text
.br
* font ([]): font name(s)
.br
* size (20): font size in percent of height (horizontal text) or width (vertical text), or absolute value if negative
.br
* baseline ('alphabetic'): baseline position. Possible values are:
.br
  * alphabetic: alphabetic position of baseline
.br
  * top: baseline at top of EM Box
.br
  * hanging: reserved, not implemented
.br
  * middle: baseline at middle of EM Box
.br
  * ideograph: reserved, not implemented
.br
  * bottom: baseline at bottom of EM Box
.br
* align ('center'): horizontal text alignment. Possible values are:
.br
  * center: center of shape
.br
  * start: start of shape (left or right depending on text direction)
.br
  * end: end of shape (right or left depending on text direction)
.br
  * left: left of shape
.br
  * right: right of shape
.br
* spacing (0): line spacing in percent of height (horizontal text) or width (vertical text), or absolute value if negative
.br
* bold (false): use bold version of font
.br
* italic (false): use italic version of font
.br
* underline (false): underline text
.br
* vertical (false): draw text vertically
.br
* flip (false): flip text vertically
.br
* extend (0): maximum text width in percent of width (for horizontal) or height (for vertical), or absolute value if negative
.br
* keep_ar_rep (true): same as keep_ar for local image in replace mode
.br
* txmx_rep ([]): same as txmx for  local image in replace mode
.br
* cmx_rep ([]): same as cmx for local image in replace mode
.br
* pad_color_rep ('none'): same as pad_color for local image in replace mode
.br
* rs_rep (false): same as rs for local image in replace mode
.br
* rt_rep (false): same as rt for local image in replace mode
.br
.SH Transition modules
.LP
.br
.SS Transition fade - software/GPU
.br
This transition performs fade to/from color of source videos
.br
Options:
.br
* color ('black'): fade color
.br
.SS Transition gltrans - GPU only
.br
This transition module wraps gl-transitions, see https://gl-transitions.com/ and gpac -h avmix:gltrans for builtin transitions
.br
Options:
.br
* fx (''): effect name for built-in effects, or path to gl-transition GLSL file
.br
.SS Transition mix - software/GPU
.br
This transition performs cross-fade of source videos
.br
.SS Transition swipe - software/GPU
.br
This transition performs simple 2D affine transformations for source videos transitions, with configurable effect origin
.br
Options:
.br
* from ('left'): direction of video 2 entry. Possible values are:
.br
  * left: from left to right edges
.br
  * right: from right to left edges
.br
  * top: from top to bottom edges
.br
  * bottom: from bottom to top edges
.br
  * topleft: from top-left to bottom-right corners
.br
  * topright: from top-right to bottom-left corners
.br
  * bottomleft: from bottom-left to top-right corners
.br
  * bottomright: from bottom-right to top-left corners
.br

.br
* mode ('slide'): how video 2 entry impacts video 1. Possible values are:
.br
  * slide: video 1 position is not modified
.br
  * push: video 2 pushes video 1 away
.br
  * squeeze: video 2 squeezes video 1 along opposite edge
.br
  * grow: video 2 size increases, video 1 not modified
.br
  * swap: video 2 size increases, video 1 size decreases
.br

.br
.SH Options (expert):
.LP
.br
pl (str, default: avmix.json): local playlist file to load
.br
live (bool, default: true):    live mode
.br
gpu (enum, default: off):      enable GPU usage
.br
* off: no GPU
.br
* mix: only render textured path to GPU, use software rasterizer for the outlines, solid fills and gradients
.br
* all: try to use GPU for everything
.br

.br
thread (sint, default: -1):    use threads for software rasterizer (-1 for all available cores)
.br
lwait (uint, default: 1000):   timeout in ms before considering no signal is present
.br
ltimeout (uint, default: 4000): timeout in ms before restarting child processes
.br
maxdur (dbl, default: 0):      run for given seconds and exit, will not abort if 0 (used for live mode tests)
.br
updates (str):                 local JSON files for playlist updates
.br
maxdepth (uint, default: 100): maximum depth of a branch in the scene graph
.br
vsize (v2d, default: 1920x1080): output video size, 0 disable video output
.br
fps (frac, default: 25):       output video frame rate
.br
pfmt (pfmt, default: yuv):     output pixel format. Use rgba in GPU mode to force alpha channel
.br
dynpfmt (enum, default: init): allow dynamic change of output pixel format in software mode
.br
* off: pixel format is forced to desired value
.br
* init: pixel format is forced to format of fullscreen input in first generated frame
.br
* all: pixel format changes each time a full-screen input PID at same resolution is used
.br

.br
sr (uint, default: 44100):     output audio sample rate, 0 disable audio output
.br
ch (uint, default: 2):         number of output audio channels, 0 disable audio output
.br
afmt (afmt, default: s16):     output audio format (only s16, s32, flt and dbl are supported)
.br
alen (uint, default: 1024):    default number of samples per frame
.br

.br
.SH avgen
.LP
.br
Description: AV Counter Generator
.br
Version: 1.0
.br
Author: GPAC Team
.br

.br
This filter generates AV streams representing a counter. Streams can be enabled or disabled using .I type.
.br
The filter is software-based and does not use GPU.
.br

.br
When .I adjust is set, the first video frame is adjusted such that a full circle happens at each exact second according to the system UTC clock.
.br
By default, video UTC and date are computed at each frame generation from current clock and not from frame number.
.br
This will result in broken UTC timing text when playing at speeds other than 1.0.
.br
This can be changed using .I lock.
.br

.br
Audio beep is generated every second, with octave (2xfreq) of even beep used every 10 seconds.
.br
When video is generated, beep is synchronized to video at each exact second.
.br

.br
If NTP injection is used, each video packet (but not audio ones) has a SenderNTP property set; if video is not used, each audio packet has a SenderNTP property set.
.br

.br
.SH Multiple output stream generation
.LP
.br
More than one output size can be specified. This will result in multiple sources being generated, one per size.
.br
A size can be specified more than once, resulting in packet references when .I copy is not set, or full copies otherwise.
.br
Target encoding bitrates can be assigned to each output using .I rates. This can be useful when generating dash:
.br
.br
gpac avgen:sizes=1280x720,1920x1080:rates=2M,5M c=aac:FID=1 c=264:FID=2:clone -o live.mpd:SID=1,2
.br

.br

.br
.SH Multiview generation
.LP
.br
In multiview mode, only the animated counter will move in depth backward and forward, as indicated by the .I disparity value.
.br
When .I pack is set, a packed stereo couple is generated for each video packet.
.br
Otherwise, when .I views is greater than 2, each view is generated on a dedicated output PID with the property ViewIdx set in [1, views].
.br
Multi-view output forces usage of .I copy mode.
.br

.br
.SH PID Naming
.LP
.br
The audio PID is assigned the name audio and ID 1.
.br
If a single video PID is produced, it is assigned the name video and ID 2.
.br
If multiple video PIDs are produced, they are assigned the names videoN and ID N+1, N in [1, sizes].
.br
If multiple .I views are generated, they are assigned the names videoN_vK and ID N*views+K-1, N in [1, sizes], K in [1, views].
.br

.br
.SH Options (expert):
.LP
.br
type (enum, default: av):      output selection
.br
* a: audio only
.br
* v: video only
.br
* av: audio and video
.br

.br
evte (uint, default: 0):       output event stream
.br
* 0: disable
.br
* 1+: period (sec) of dummy events
.br

.br
freq (uint, default: 440):     frequency of beep
.br
freq2 (uint, default: 659):    frequency of odd beep
.br
sr (uint, default: 44100):     output samplerate
.br
flen (uint, default: 1024):    output frame length in samples
.br
ch (uint, default: 1):         number of channels
.br
alter (bool, default: false):  beep alternatively on each channel
.br
blen (uint, default: 50):      length of beep in milliseconds
.br
fps (frac, default: 25):       video frame rate
.br
sizes (v2il, default: 1280x720): video size in pixels
.br
pfmt (pfmt, default: yuv):     output pixel format
.br
lock (bool, default: false):   lock timing to video generation
.br
dyn (bool, default: true):     move bottom banner
.br
ntp (bool, default: true):     send NTP along with packets
.br
copy (bool, default: false):   copy the framebuffer into each video packet instead of using packet references
.br
dur (frac, default: 0/0):      run for the given time in second
.br
adjust (bool, default: true):  adjust start time to synchronize counter and UTC
.br
pack (enum, default: no):      packing mode for stereo views
.br
* no: no packing
.br
* ss: side by side packing, forces .I views to 2
.br
* tb: top-bottom packing, forces .I views to 2
.br

.br
disparity (uint, default: 20): disparity in pixels between left-most and right-most views
.br
views (uint, default: 1):      number of views
.br
rates (strl):                  number of target bitrates to assign, one per size
.br
logt (bool):                   log frame time to console
.br
banner (str, default: many thanks to QuickJS, FreeType, OpenSSL, SDL, FFmpeg, OpenHEVC, libjpeg, libpng, faad2, libmad, a52dec, xvid, OGG ...): banner text to display
.br

.br
.SH EXAMPLES
.TP
Basic and advanced examples are available at https://wiki.gpac.io/Filters/Filters
.SH MORE
.LP
Authors: GPAC developers, see git repo history (-log)
.br
For bug reports, feature requests, more information and source code, visit https://github.com/gpac/gpac
.br
build: 2.5-DEV
.br
Copyright: (c) 2000-2024 Telecom Paris distributed under LGPL v2.1+ - https://gpac.io
.br
.SH SEE ALSO
.LP
gpac(1), MP4Box(1)
